| 8 Nov 2024 |
| Nina (e1mo) changed their profile picture. | 08:11:11 |
| @stepbrobd:matrix.org joined the room. | 18:59:09 |
| 11 Nov 2024 |
| Luna joined the room. | 13:03:19 |
Luna | Hi, I've recently found this project and was wondering if it's possible to just replace an existing deploy-rs setup with Colmena or would it cause some issues? | 13:04:01 |
| tornax joined the room. | 18:49:13 |
tornax | In reply to @luna:bddvlpr.com Hi, I've recently found this project and was wondering if it's possible to just replace an existing deploy-rs setup with Colmena or would it cause some issues? hi! As far as I know, colmena isn't a drop-in replacement for deploy-rs | 18:49:37 |
tornax | both are using a different config structure | 18:49:47 |
| 13 Nov 2024 |
Luna | Well besides reconfiguring the config structure, I’ve tried replacing deploy-rs’ flake structure with colmena’s but ran into some troubles. I’m guessing it’s because of the experimental flake support but haven’t had the time to properly look into it yet. | 11:53:02 |
| 15 Nov 2024 |
ser(ial) | can colmena secrets deploy a whole directory, not single files only? | 09:51:15 |
ibizaman | In reply to @luna:bddvlpr.com Well besides reconfiguring the config structure, I’ve tried replacing deploy-rs’ flake structure with colmena’s but ran into some troubles. I’m guessing it’s because of the experimental flake support but haven’t had the time to properly look into it yet. I did the opposite for some of my machines recently to test deploy-es and had no issue. Feel free to post the log here next time. | 12:25:29 |
ibizaman | In reply to @luna:bddvlpr.com Well besides reconfiguring the config structure, I’ve tried replacing deploy-rs’ flake structure with colmena’s but ran into some troubles. I’m guessing it’s because of the experimental flake support but haven’t had the time to properly look into it yet. * | 12:25:36 |
| 16 Nov 2024 |
Luna | In reply to @ibizaman:matrix.org I did the opposite for some of my machines recently to test deploy-es and had no issue. Feel free to post the log here next time. Will do^ | 11:41:09 |
| @rcouto:matrix.org joined the room. | 21:35:13 |
| inomena joined the room. | 22:45:18 |
inomena | hi, looking at the docs w/flakes each host is defined in outputs.colmena.<hostname> similar to nixosConfigurations, but is it possible to instead read each host's configuration from separate files? e.g. instead of outputs.colmena.host-a and outputs.colmena.host-b I could refer to files hosts/host-a.nix and hosts/host-b.nix (and all possible hosts within the hosts/ directory without specifying each one in flake.nix) | 22:49:07 |
inomena | I would still want to use outputs.colmena.meta and outputs.colmena.defaults in this scenario | 22:51:13 |
| 17 Nov 2024 |
inomena | think I figured it out, or atleast it seems to work:
outputs = {nixpkgs, ...}:
let
hosts = nixpkgs.lib.mapAttrs'
(filename: _: {
name = nixpkgs.lib.nameFromURL filename ".";
value = [ ./hosts/${filename} ];
})
(builtins.readDir ./hosts);
in {
colmena = hosts // {
# ...
};
};
| 08:39:26 |
ibizaman | In reply to @inomena:matrix.org
think I figured it out, or atleast it seems to work:
outputs = {nixpkgs, ...}:
let
hosts = nixpkgs.lib.mapAttrs'
(filename: _: {
name = nixpkgs.lib.nameFromURL filename ".";
value = [ ./hosts/${filename} ];
})
(builtins.readDir ./hosts);
in {
colmena = hosts // {
# ...
};
};
Oh nice you went the extra mile with readDir. I was going to suggest plain imports but that works well! | 08:57:01 |
inomena | I wanted it to be fully dynamic, so that the only thing I need to do to add a new host to the hive is to define a single <hostname>.nix file in the hosts dir and nothing else | 08:57:56 |
inomena | not having to also define it in a few other places | 08:58:09 |
inomena | * not having to also define imports in a few other places | 08:58:18 |
nixy | In reply to @ser:sergevictor.eu can colmena secrets deploy a whole directory, not single files only? I don't believe so. But you can use the keyCommand option to create an archive (tar, zip) from a directory and then use systemd services to extract it. That's what I do for this at least | 14:06:26 |
ser(ial) | that's a nice concept, i didn't think about it, thanks! | 14:08:58 |
| @jh-devv:matrix.org joined the room. | 18:39:43 |
@jh-devv:matrix.org | What tool do you people think would fit well with Colmena when deploying bare metal? | 18:50:44 |
@jh-devv:matrix.org | Unattended install etc. | 18:50:52 |
| 18 Nov 2024 |
Luna | In reply to@ibizaman:matrix.org I did the opposite for some of my machines recently to test deploy-rs and had no issue. Feel free to post the log here next time. Finally got to it, here's what I get:
[INFO ] Enumerating nodes...
error:
… while calling the 'attrNames' builtin
at «string»:1:190:
1| with builtins; let assets = getFlake "path:/tmp/colmena-assets-HeCr3l?lastModified=1731921370&narHash=sha256-xWcw5WYfWGtmkZGFW7NjzxlGh8vDejJzDNJj2nJg7Dk%3D"; hive = assets.processFlake; in attrNames hive.nodes
| ^
… while calling the 'getFlake' builtin
at «string»:1:29:
1| with builtins; let assets = getFlake "path:/tmp/colmena-assets-HeCr3l?lastModified=1731921370&narHash=sha256-xWcw5WYfWGtmkZGFW7NjzxlGh8vDejJzDNJj2nJg7Dk%3D"; hive = assets.processFlake; in attrNames hive.nodes
| ^
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: cannot update unlocked flake input 'hive' in pure mode
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace
| 09:17:57 |
Luna | Oh my bad, I forgot --experimental-flake-eval, this is the log I get:
[WARN ] Using direct flake evaluation (experimental)
[INFO ] Enumerating nodes...
[INFO ] Selected all 4 nodes.
❌ 4s Failed: Child process exited with error code: 1
(...) ❌ 4s Evaluation failed: Child process exited with error code: 1
[ERROR] Failed to complete requested operation - Last 1 lines of logs:
[ERROR] failure) Child process exited with error code: 1
[ERROR] Failed to evaluate phobos, ceres, deimos, and ariel - Last 20 lines of logs:
[ERROR] stderr) 1575| else
[ERROR] stderr)
[ERROR] stderr) … while evaluating the attribute 'value'
[ERROR] stderr) at /nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/lib/modules.nix:816:9:
[ERROR] stderr) 815| in warnDeprecation opt //
[ERROR] stderr) 816| { value = addErrorContext "while evaluating the option `${showOption loc}':" value;
[ERROR] stderr) | ^
[ERROR] stderr) 817| inherit (res.defsFinal') highestPrio;
[ERROR] stderr)
[ERROR] stderr) … while evaluating the option `system.build.toplevel':
[ERROR] stderr)
[ERROR] stderr) … while evaluating definitions from `/nix/store/hfz1qqd0z8amlgn8qwich1dvkmldik36-source/nixos/modules/system/activation/top-level.nix':
[ERROR] stderr)
[ERROR] stderr) (stack trace truncated; use '--show-trace' to show the full, detailed trace)
[ERROR] stderr)
[ERROR] stderr) error:
[ERROR] stderr) Failed assertions:
[ERROR] stderr) - The ‘fileSystems’ option does not specify your root file system.
[ERROR] stderr) - You must set the option ‘boot.loader.grub.devices’ or 'boot.loader.grub.mirroredBoots' to make the system bootable.
[ERROR] failure) Child process exited with error code: 1
[ERROR] -----
[ERROR] Operation failed with error: Child process exited with error code: 1
Hint: Backtrace available - Use `RUST_BACKTRACE=1` environment variable to display a backtrace
Is disko perhaps not compatible with colmena? | 09:20:22 |
ibizaman | In reply to @jh-devv:matrix.org What tool do you people think would fit well with Colmena when deploying bare metal? Any tool should be compatible. I used nixos-anywhere successfully and heard about nixos-infect working too. I’ve got a flake template for the former https://github.com/ibizaman/skarabox if you want some inspiration. | 09:27:06 |
Luna | Perhaps its not reading any of the configuration as the log shows
(...) | evaluation warning: system.stateVersion is not set, defaulting to 25.05. Read why this matters on https://nixos.org/manual/nixos/stable/options.html#opt-system.stateVersion.
While a repl shows
nix-repl> outputs.nixosConfigurations.ariel.config.system.stateVersion
"24.05"
nix-repl>
| 09:27:29 |