!UKDpaKNNsBpOPfLWfX:zhaofeng.li

Colmena

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

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


SenderMessageTime
8 Mar 2022
@github:maunium.net@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@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
@finn:tomesh.netfinn left the room.20:08:50
13 Mar 2022
@winterqt:nixos.devWinter (she/her) Does Colmena eval all nodes even when doing --on ...? 03:02:17
@winterqt:nixos.devWinter (she/her)I ask since it's throwing an error in a configuration for a host that I didn't specify -- it doesn't try to deploy to it, though.03:03:18
@zhaofeng:zhaofeng.liZhaofeng Li It eval all nodes' deployment config only if you match against tags like --on @some-tag. If you just match against names, it will just evaluate the matched attributes. 03:04:43
@zhaofeng:zhaofeng.liZhaofeng Li* It will eval all nodes' `deployment` config only if you match against tags like `--on @some-tag`. If you just match against names, it will just evaluate the matched attributes.03:04:55
@winterqt:nixos.devWinter (she/her)yeah that seems to be broken 😅03:11:43
@winterqt:nixos.devWinter (she/her)will file a proper bug report03:11:48
@zhaofeng:zhaofeng.liZhaofeng Li
In reply to @winterqt:nixos.dev
yeah that seems to be broken 😅
Oh right, are you using 0.2 or the unstable version? That was done post-release as part of the deployment logic rewrite
03:14:11
@winterqt:nixos.devWinter (she/her)I'm using 2b281286d00ac9a0ae6f671b3b9b6db27b9e093603:15:25
@zhaofeng:zhaofeng.liZhaofeng LiHmm, then it should have been there. Probably some bug then03:17:27

Show newer messages


Back to Room ListRoom Version: 6