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.