When running deploy with a bunch of hosts it would be useful to see details of what changed. This could be done manually by doing something like this:
- SSH into each host and
readlink --canonicalize /nix/var/nix/profiles/system to get the current system state.
- Run
deploy.
- SSH into each host again and diff the new system path to the original.
But this is cumbersome:
- It reports the diff after
deploy, rather than integrated with the rest of the host-specific deploy-rs output.
- It requires inspecting
nixosConfigurations to get the hostname.
- It doesn't integrate with deploy-rs's
--ssh-user, --hostname, etc.
It would be great if deploy-rs integrated seamlessly with existing diffing tools like nix store diff-closures and/or nvd (like bento does).
Bike-shedding:
- Should this be enabled or disabled by default? I must confess I would like this to be enabled by default, since deploy-rs already prints some information about which services changed state, and since the diff is the second most important piece of information after any error messages.
- Should it use high-level tools like
nvd if they exist, and fall back to nix store diff-closures if they don't, or should the user have to explicitly specify the tool? Automatic fallback is simpler to use, but harder to implement. Manual configuration is harder to use, but easier to implement with something like --diff-tool=CMD.
Complexities:
- In case of
--boot or --result-path, deploy-rs should do the expected thing and diff the original system path to the newly created path.
When running
deploywith a bunch of hosts it would be useful to see details of what changed. This could be done manually by doing something like this:readlink --canonicalize /nix/var/nix/profiles/systemto get the current system state.deploy.But this is cumbersome:
deploy, rather than integrated with the rest of the host-specific deploy-rs output.nixosConfigurationsto get the hostname.--ssh-user,--hostname, etc.It would be great if deploy-rs integrated seamlessly with existing diffing tools like
nix store diff-closuresand/ornvd(like bento does).Bike-shedding:
nvdif they exist, and fall back tonix store diff-closuresif they don't, or should the user have to explicitly specify the tool? Automatic fallback is simpler to use, but harder to implement. Manual configuration is harder to use, but easier to implement with something like--diff-tool=CMD.Complexities:
--bootor--result-path, deploy-rs should do the expected thing and diff the original system path to the newly created path.