!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

Load older messages


SenderMessageTime
3 Apr 2022
@github:maunium.net@github:maunium.net [zhaofengli/colmena] blaggacao opened issue #72: Evaluation

I saw your efforts to speed up evaluation. This might be a project that you might keep an eye on: https://github.com/kamadorueda/santiago

Not immediately useful.

22:22:54
4 Apr 2022
@github:maunium.net@github:maunium.net [zhaofengli/colmena] Repo forked into blaggacao/colmena 00:07:31
@github:maunium.net@github:maunium.net [zhaofengli/colmena] blaggacao opened pull request #73: imp: soc of eval, modules & options
  • the reason for this change is to have more transparent separation of concern between effectuations of the module system and pre-module system effectuations

  • with improved flakes support down the line, pre-module system effectuations will get more complex

  • if the code was clean before, this does not introduce a change in behaviour. Unclean prior code, could now be surfaced by this.

00:07:43
@github:maunium.net@github:maunium.netRedacted or Malformed Event00:08:55
@github:maunium.net@github:maunium.netRedacted or Malformed Event00:10:47
@github:maunium.net@github:maunium.netRedacted or Malformed Event00:25:37
@github:maunium.net@github:maunium.netRedacted or Malformed Event00:27:46
@github:maunium.net@github:maunium.netRedacted or Malformed Event02:12:37
@github:maunium.net@github:maunium.netRedacted or Malformed Event02:12:39
@github:maunium.net@github:maunium.netRedacted or Malformed Event02:14:06
@github:maunium.net@github:maunium.netRedacted or Malformed Event02:14:41
@github:maunium.net@github:maunium.netRedacted or Malformed Event02:21:21
@github:maunium.net@github:maunium.net left the room.02:28:47
5 Apr 2022
@jhillyerd:matrix.orgjhillyerd joined the room.20:42:35
@jhillyerd:matrix.orgjhillyerdHi. Thinking about moving my legacy nixops config over to colmena+flakes. I know colmena doesn't create machines on the fly, which is fine since I'm running my setup on bare metal. But I like testing on VMs first when I make big changes. How does one go about testing against a staging environment in colmena? Import that same config into two different host entries?23:49:02
@schnecfk:ruhr-uni-bochum.deCRTified
In reply to @jhillyerd:matrix.org
Hi. Thinking about moving my legacy nixops config over to colmena+flakes. I know colmena doesn't create machines on the fly, which is fine since I'm running my setup on bare metal. But I like testing on VMs first when I make big changes. How does one go about testing against a staging environment in colmena? Import that same config into two different host entries?
You could use a shim like this: https://github.com/zhaofengli/colmena/issues/60#issuecomment-1047199551 and stay consistent with the de-facto flake output standard. Then, you could use the resulting derivation at self.nixosConfigurations.<name>.config.system.build.vm to run the VM as it was possible with nixos-rebuild build-vm
23:53:12
6 Apr 2022
@jhillyerd:matrix.orgjhillyerdSo if I'm reading that right, you are configuring your system using the nix flake nixosConfigurations syntax, then mapping it into the colmena attribute?00:00:40
@schnecfk:ruhr-uni-bochum.deCRTifiedExactly00:00:53
@jhillyerd:matrix.orgjhillyerdI guess that leaves the other half of my question, applying the same config to two different machines... I suppose I could just use nixos-rebuild with the flake and --target-host pointing at my test vm?00:02:52
@schnecfk:ruhr-uni-bochum.deCRTified

Something like this in your flake should give you the VMs as a nix build .#vm-hostname target:

  packages = with nixpkgs.lib;
    mapAttrs' (host: sys: {
      name = "vm-${host}";
      value = sys.config.system.build.vm;
    }) self.nixosConfigurations;
00:03:19
@schnecfk:ruhr-uni-bochum.deCRTifiedI'm doing something similar, by cross-compiling SD-Images for my aarch64 hosts00:03:39
@schnecfk:ruhr-uni-bochum.deCRTified(But there I'm filtering to check whether the sdImage build output exists)00:04:55
@jhillyerd:matrix.orgjhillyerd Oh nice. That would leave me with a script similar to nixos-rebuild build-vm ? 00:11:38
@schnecfk:ruhr-uni-bochum.deCRTifiedexactly00:11:43
@schnecfk:ruhr-uni-bochum.deCRTified Note that you don't need these packages - you can access that attribute directly like this: nix build .\#nixosConfigurations.<hostname>.config.system.build.vm 00:14:17
@schnecfk:ruhr-uni-bochum.deCRTified

Result looks like this:

$ find result/
result/
result/system
result/bin
result/bin/run-cottonbox-vm
00:15:03
@schnecfk:ruhr-uni-bochum.deCRTified (and the run-cottonbox-vm script spawns the qemu instance) 00:15:33
@jhillyerd:matrix.orgjhillyerdCool. So it sounds like step 1 for me is to move my existing nixops into a flake, get the test vm running, then I can look at mapping the flake into colmena.00:22:51
@schnecfk:ruhr-uni-bochum.deCRTifiedYes, that's a plan00:23:55
@schnecfk:ruhr-uni-bochum.deCRTified jhillyerd: although I'm heading to bed now, feel free to ping me. I did exactly the same migration from nixops to colmena+flakes 00:40:19

There are no newer messages yet.


Back to Room ListRoom Version: 6