| 20 May 2023 |
@julian:nekover.se | That makes sense, thanks! What I'm wondering now, is how to make sure my systems are up-to-date then. Some kind of automated deployment from some deployment system, which automatically updates the flake.lock? What are you all doing? | 16:13:06 |
@obsidianical:matrix.org | nix flake update --commit-lock-file whenever i feel like it (this is probably not a good idea idk better then not updating?) | 16:17:32 |
| @obsidianical:matrix.org changed their display name from Schrottkatze to Schrottkatze (they/she, de: sie/ihr). | 16:29:01 |
| 21 May 2023 |
| @obsidianical:matrix.org changed their display name from Schrottkatze (they/she, de: sie/ihr) to Schrottkatze (moving to @schrottkatze:katzen.cafe). | 17:52:51 |
| 22 May 2023 |
| Reventlov left the room. | 06:53:09 |
emily | In reply to @me:indeednotjames.com
anyone else noticing that targets in a flake don't substitute from cache.nixos.org when running colmena apply? I haven't investigated further yet. But I did notice that disabling nix copy seems to fix it 👀
really dump patch, as there is no cmd flag to disable it (running latest main):
diff --git a/src/nix/host/ssh.rs b/src/nix/host/ssh.rs
index d45ed99..1b33717 100644
--- a/src/nix/host/ssh.rs
+++ b/src/nix/host/ssh.rs
@@ -261,7 +261,7 @@ impl Ssh {
let ssh_options = self.ssh_options();
let ssh_options_str = ssh_options.join(" ");
- let mut command = if self.use_nix3_copy {
+ let mut command = if false {
// experimental `nix copy` command with ssh-ng://
let mut command = Command::new("nix");
oh wow, I found out why. will try to send a PR (containing a proper fix) tomorrow :) | 23:14:19 |
| 23 May 2023 |
| Tirth Jain joined the room. | 02:21:12 |
| 24 May 2023 |
tim | In reply to @julian:nekover.se That makes sense, thanks! What I'm wondering now, is how to make sure my systems are up-to-date then. Some kind of automated deployment from some deployment system, which automatically updates the flake.lock? What are you all doing? I stole this github action from some other repo and put it into all my flake repos | 04:49:15 |
| @networkexception:chat.upi.li joined the room. | 08:46:27 |
| 25 May 2023 |
| raitobezarius changed their display name from raitobezarius to disko in NixOS 23.11 when. | 13:32:34 |
| raitobezarius changed their display name from disko in NixOS 23.11 when to raitobezarius. | 13:37:36 |
| 26 May 2023 |
| Notkea left the room. | 18:50:55 |
| 27 May 2023 |
| Chinchilla Wetreat changed their profile picture. | 16:31:28 |
| NixOS Moderation Botchanged room power levels. | 16:40:46 |
| 28 May 2023 |
Yuu Yin | Redacted or Malformed Event | 20:34:54 |
| 30 May 2023 |
| @the_observer:fairydust.space joined the room. | 17:25:38 |
@the_observer:fairydust.space | Hey, how do I reference another option when using colmena? I want to set the dhparams path for the nginx service to the value of the security.dhparams.params.nginx.pathoption (which is readOnly anyways).
In nixos, that would be config.. I tried that host. and config.host. but it doesnt work like that.
| 17:28:33 |
Zhaofeng Li | It definitely should work. What does your config look like? | 17:29:26 |
@the_observer:fairydust.space | In reply to @zhaofeng:zhaofeng.li It definitely should work. What does your config look like? Just using config. or how? | 17:30:13 |
Zhaofeng Li | Yes | 17:30:20 |
@the_observer:fairydust.space | {
meta = {
*shortened*
};
defaults = { pkgs, ... }: {
*shortened*
};
web = {
networking = {
hostName = "web";
defaultGateway = "10.2.0.1";
interfaces.eth0.ipv4.addresses = [ {
address = "10.2.1.201";
prefixLength = 16;
} ];
};
deployment = {
targetHost = "10.2.1.201";
tags = [ "lxc" ];
};
boot.isContainer = true;
systemd.suppressedSystemUnits = [
"dev-mqueue.mount"
"sys-kernel-debug.mount"
"sys-fs-fuse-connections.mount"
];
security = {
dhparams = {
enable = true;
stateful = true;
path = "/etc/dhparams";
params.nginx = {
bits = 4096;
};
};
};
services = {
nginx = {
enable = true;
sslDhparam = config.security.dhparams.params.nginx.path;
};
};
};
}
This config gives error: undefined variable 'config'
| 17:33:36 |
Zhaofeng Li | Do it like:
web = { pkgs, config, ... }: {
networking = { ... };
};
or better,
web = ./web.nix; # which contains a lambda that takes { pkgs, config, ... }
| 17:34:50 |
Zhaofeng Li | For each node you are passing a NixOS module | 17:35:21 |
@the_observer:fairydust.space | Thank you! :) | 17:38:51 |
Zhaofeng Li | Note they are just regular NixOS modules, which means you can do
mkdir hosts
cp -r /etc/nixos ./hosts/web
And then
web = ./hosts/web/configuration.nix;
| 17:42:06 |
| 1 Jun 2023 |
| raphi changed their display name from raphi to raphi (element unread channel fix when). | 13:03:27 |
| @solomon:cofree.coffee joined the room. | 18:38:18 |
| 2 Jun 2023 |
| Alexander joined the room. | 16:43:44 |
Alexander | Hi there. Have a question about nixpkgs per node inside a flake. I'm trying following configuration likewise in manual for a hive:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/7076110064c09f0b3942f609f2134c1358ef2e50";
};
outputs = { nixpkgs, ... }: {
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
};
nodeNixpkgs.desktop = ./nixpkgs-23.05;
};
desktop = import ./desktop.nix;
};
};
}
But it does not work:
error: Passing a path to Nixpkgs as meta.nodeNixpkgs.pc is no longer accepted with Flakes.
Please initialize Nixpkgs like the following:
{
# ...
outputs = { nixpkgs, ... }: {
colmena = {
meta.nodeNixpkgs.pc = import nixpkgs {
system = "x86_64-linux"; # Set your desired system here
overlays = [];
};
};
};
}
Is it possible somehow to pin specific version of nixpkgs for a host in flake configuration?
| 16:53:06 |
Alexander | * Hi there. Have a question about nixpkgs per node inside a flake. I'm trying following configuration likewise in manual for a hive:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/7076110064c09f0b3942f609f2134c1358ef2e50";
};
outputs = { nixpkgs, ... }: {
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [];
};
nodeNixpkgs.desktop = ./nixpkgs-23.05;
};
desktop = import ./desktop.nix;
};
};
}
But it does not work:
error: Passing a path to Nixpkgs as meta.nodeNixpkgs.pc is no longer accepted with Flakes.
Please initialize Nixpkgs like the following:
{
# ...
outputs = { nixpkgs, ... }: {
colmena = {
meta.nodeNixpkgs.desktop = import nixpkgs {
system = "x86_64-linux"; # Set your desired system here
overlays = [];
};
};
};
}
Is it possible somehow to pin specific version of nixpkgs for a host in flake configuration?
| 16:53:51 |