I use
sudo nixos-rebuild switch --flake .#
and
nix build .#homeConfigurations.user.activationPackage
./result/activate
to update my system. Is there a way to see which packages are going to be updated before I run these commands, or a way to see which packages were updated after the fact?
teto
January 22, 2023, 9:24pm
2
to see it after the fact (but you can then rollback), I recently found on this very discourse the following snippet:
system.activationScripts.report-nixos-changes = ''
PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]}
nvd diff $(ls -dv /nix/var/nix/profiles/system-*-link | tail -2)
'';
system.activationScripts.report-home-manager-changes = ''
PATH=$PATH:${lib.makeBinPath [ pkgs.nvd pkgs.nix ]}
nvd diff $(ls -dv /nix/var/nix/profiles/per-user/teto/home-manager-*-link | tail -2)
'';
2 Likes
noblman
January 23, 2023, 12:40am
4
What would that look like? I am using what Wil T suggested in his video on using flakes.