| 21 Feb 2022 |
@github:maunium.net | [zhaofengli/colmena] tv42 opened
issue
#60: Using nixosSystem? Flake future?
Hi. It seems mainstream NixOS is heading toward using nixpkgs.lib.nixosSystem, and standard ways of defining nixos hosts in a flake.nix: https://nixos.wiki/wiki/Flakes#Using_nix_flakes_with_NixOS
Any thoughts on integrating with that world with colmena? I'm keen to keep my configuration as close to "mainstream" as I can, while using remote deploys (some of my hosts are definitely too weak to build themselves).
It seems mainstream NixOS is getting remote deploys too: nixos-rebuild --flake .#mymachine --target-host mymachine-hostname --build-host localhost switch
| 20:06:05 |
| 22 Feb 2022 |
n0emis | Os there a easy way to acces the merged nixos-config, e.g. to build a vm with it (via nixos-rebuild build-vm or something like it)? | 15:41:28 |
n0emis | * Is there a easy way to acces the merged nixos-config, e.g. to build a vm with it (via nixos-rebuild build-vm or something like it)? | 15:42:39 |
CRTified | In reply to @n0emis:noemis.me Is there a easy way to acces the merged nixos-config, e.g. to build a vm with it (via nixos-rebuild build-vm or something like it)? In the end, you "just" need to evaluate the configuration and get the derivation at the attribute path config.system.build.vm from that evaluation 🙂 | 15:45:21 |
CRTified | As far as I can tell, it's easier with flakes if you use a helper function as I've documented here: https://github.com/zhaofengli/colmena/issues/60#issuecomment-1047199551 | 15:46:11 |
CRTified | If you do so, you can access the evaluated configuration within the packages output of the flake - for example, you can reference self.nixosConfigurations.HOSTNAME.config.system.build.vm and add it to the packages attrset | 15:47:10 |
CRTified | * If you do so, you can access the evaluated configuration within the packages output of the flake - for example, you can reference self.nixosConfigurations.HOSTNAME.config.system.build.vm and add it to the packages attrset (I'm doing something similar to build aarch64 sd-images) | 15:47:36 |
CRTified | For non-flakes configs, you could just eval-config and get that attribute out of the result, check https://github.com/NixOS/nixpkgs/blob/master/nixos/lib/eval-config.nix for that. But that's probably a bit out of scope for the colmena channel, as it only relies on nixpkgs 🙂 | 15:56:08 |
| 23 Feb 2022 |
@github:maunium.net | [zhaofengli/colmena] utsl42 opened
issue
#61: override deployment.targetUser in CLI
Could we have a CLI argument or environment variable to override the deployment.targetUser? Useful in cases where the remote user isn't the same, but someone else might need to use a different username to deploy, so setting it in the Nix configuration isn't helpful.
| 19:42:46 |
| 2 Mar 2022 |
| phaer set a profile picture. | 13:09:06 |
| phaer changed their display name from phaer to Paul Haerle. | 13:09:24 |
| 6 Mar 2022 |
Winter (she/her) | there's no way to parallelize/improve the efficiency of the copying path ... to ... stage when using buildOnTarget, right? | 18:42:57 |
Winter (she/her) | upgrading unstable for the first time in over a month and these node.js deps are killing me 😅 | 18:44:15 |
Winter (she/her) | oh i guess my pam mass rebuild situation didn't make things any better, heh... | 18:45:53 |
Winter (she/her) | surprised this machine hasn't oom'd yet | 18:46:05 |
Winter (she/her) | very surprised | 18:46:37 |
Winter (she/her) | guess colmena buildOnTarget is more efficient than nixos-rebuild 😓 | 18:46:58 |
| 7 Mar 2022 |
Winter (she/her) | so i use colmena exec to reboot all the machines in my hive, and it always exits with an error because it's not able to call nix(?); says it exits with an error code of 255
why would it be trying to run nix? and is it trying to do it on the remote machine which is probably down by the time it tries to run it...? | 03:17:21 |
Zhaofeng Li | In reply to @winterqt:nixos.dev
so i use colmena exec to reboot all the machines in my hive, and it always exits with an error because it's not able to call nix(?); says it exits with an error code of 255
why would it be trying to run nix? and is it trying to do it on the remote machine which is probably down by the time it tries to run it...? Oh right, I should change the error message from "Nix exited with error code" to "Child process exited with error code." It's misleading in this case. | 04:04:25 |
Winter (she/her) | In reply to @zhaofeng:zhaofeng.li Oh right, I should change the error message from "Nix exited with error code" to "Child process exited with error code." It's misleading in this case. would the child process be ssh in this case? | 04:33:35 |
Zhaofeng Li | In reply to @winterqt:nixos.dev would the child process be ssh in this case? Yeah, I presume it was because of the remote host disconnecting. I should really add a --reboot feature so there is no need to do a colmena exec after activation | 04:35:48 |
@github:maunium.net | [zhaofengli/colmena] tv42 opened
issue
#62: nix-eval-jobs patch causes build failure with nixos-21.11 nixpkgs
If you use a flake of colmena and do inputs.nixpkgs.follows = "nixpkgs";, it fails to build:
error: builder for '/nix/store/2sikwzzkkzggxi7snbml0sc7sv4wkzn2-nix-eval-jobs-0.0.1-colmena.drv' failed with exit code 1;
last 10 log lines:
> unpacking source archive /nix/store/wndp1lpb7g9gs3fmh4pjmqw80pjiw606-source
> source root is source
> patching sources
> applying patch /nix/store/mgnkwc0sbk8x3jn4x7gny013mp4gsvfh-1e0f309fefc9b2d597f8475a74c82ce29c189152.patch
> patching file src/nix-eval-jobs.cc
> Hunk #2 FAILED at 37.
> Hunk #3 succeeded at 96 with fuzz 1 (offset -7 lines).
> Hunk #4 succeeded at 235 (offset -14 lines).
> Hunk #5 succeeded at 288 (offset -14 lines).
> 1 out of 5 hunks FAILED -- saving rejects to file src/nix-eval-jobs.cc.rej
For full logs, run 'nix log /nix/store/2sikwzzkkzggxi7snbml0sc7sv4wkzn2-nix-eval-jobs-0.0.1-colmena.drv'.
In general, I like to run my systems on stable nixpkgs as much as possible.
| 19:25:32 |
| 8 Mar 2022 |
@github:maunium.net | [zhaofengli/colmena] Repo forked into glenn-m/colmena | 04:04:03 |
@github:maunium.net | [zhaofengli/colmena] glenn-m opened
pull request
#63: apply_local: Fix nixos detection from os-release
This fixes apply-local not detecting the system as NixOS due to the changes in the format of the os-release file.
Details on the changes made to the os-release file can be found in the following commit https://github.com/NixOS/nixpkgs/commit/bae181d3f0f453d9a23cf5e899c2cb0f96e91fef.
I'm new to Rust so let me know if I've missed anything, thanks!
| 04:23:28 |
@github:maunium.net | [zhaofengli/colmena] zhaofengli merged
pull request
#63: apply_local: Fix nixos detection from os-release
| 04:52:24 |
Winter (she/her) | unstable manual is 404ing 😕
was it moved to 0.3 (instead of unstable)? | 13:07:28 |
| finn joined the room. | 16:16:17 |
Zhaofeng Li | In reply to @winterqt:nixos.dev unstable manual is 404ing 😕
was it moved to 0.3 (instead of unstable)? Oops, my bad. I added linkcheck as an additional mdbook output, and that changed the directory structure. I just pushed the fix and it should be live soon. Thanks for the heads up! | 18:29:15 |
@github:maunium.net | [zhaofengli/colmena] zhaofengli published v0.2.2: v0.2.2 - Fix `apply-local` on nixos-unstable | 19:09:12 |
| 11 Mar 2022 |
@github:maunium.net | [zhaofengli/colmena] scvalex opened
issue
#64: Add plan/diff command
A plan or diff-current-to-next command would be useful to have.
We can get something pretty close already by combining colmena and nix-diff:
$ colmena build --on laptop
[INFO ] Using configuration: ./deployment.nix
[INFO ] Enumerating nodes...
[INFO ] Selected 1 out of 5 hosts.
✅ 11s All done!
laptop ✅ 10s Evaluated laptop
laptop ✅ 1s Built "/nix/store/r829pyjngqxmn7k1j9j39w3rcaarg2d1-nixos-system-laptop-21.11pre-git"
$ nix-diff --color always --character-oriented /var/run/current-system /nix/store/r829pyjngqxmn7k1j9j39w3rcaarg2d1-nixos-system-laptop-21.11pre-git | less -R
There are a few problems with the above:
nix-diff is a separate package to install,
- the diff isn't great (the full diff contains the entirety of
options.xml and is 26MB in size); that said, i think that if we diffed just a few specific things like system-path, that would be useful,
- the diff requires the previous system derivation to be available locally.
If you're interested in a feature like this, I'd be up for rewriting nix-diff as a rust library and trying to integrate it into colmena.
| 11:28:18 |