!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

332 Members
A simple, stateless NixOS deployment tool - https://github.com/zhaofengli/colmena111 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
19 Feb 2022
@github:maunium.net@github:maunium.net [zhaofengli/colmena] cole-h closed pull request #56: WIP: add deployment.nixpkgs option 19:05:24
21 Feb 2022
@cw:kernelpanic.cafeChinchilla Wetreat changed their display name from Chuck Winter to Chinchilla Wetreat.00:47:29
@github:maunium.net@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:noemis.men0emis 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:noemis.men0emis * 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
@schnecfk:ruhr-uni-bochum.deCRTified
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
@schnecfk:ruhr-uni-bochum.deCRTifiedAs 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-104719955115:46:11
@schnecfk:ruhr-uni-bochum.deCRTified 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
@schnecfk:ruhr-uni-bochum.deCRTified * 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
@schnecfk:ruhr-uni-bochum.deCRTifiedFor 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@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:matrix.orgPaul Haerle set a profile picture.13:09:06
@phaer:matrix.orgPaul Haerle changed their display name from phaer to Paul Haerle.13:09:24
6 Mar 2022
@winterqt:nixos.devWinter (she/her) there's no way to parallelize/improve the efficiency of the copying path ... to ... stage when using buildOnTarget, right? 18:42:57
@winterqt:nixos.devWinter (she/her)upgrading unstable for the first time in over a month and these node.js deps are killing me 😅18:44:15
@winterqt:nixos.devWinter (she/her)oh i guess my pam mass rebuild situation didn't make things any better, heh...18:45:53
@winterqt:nixos.devWinter (she/her)surprised this machine hasn't oom'd yet18:46:05
@winterqt:nixos.devWinter (she/her)very surprised18:46:37
@winterqt:nixos.devWinter (she/her)guess colmena buildOnTarget is more efficient than nixos-rebuild 😓18:46:58
7 Mar 2022
@winterqt:nixos.devWinter (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:zhaofeng.liZhaofeng 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
@winterqt:nixos.devWinter (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:zhaofeng.liZhaofeng 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@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@github:maunium.net [zhaofengli/colmena] Repo forked into glenn-m/colmena 04:04:03
@github:maunium.net@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

Show newer messages


Back to Room ListRoom Version: 6