Skip to content

Commit

Permalink
nix: diff changes on switching to new config
Browse files Browse the repository at this point in the history
  • Loading branch information
contrun committed Feb 22, 2024
1 parent 4a70b46 commit 1ae2352
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions nix/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,14 @@ in
stateVersion = prefs.systemStateVersion;
activationScripts =
{
# Diff system changes on switch. Taken from
# https://github.com/luishfonseca/dotfiles/blob/6193dff46ad05eca77dedba9afbc50443a8b3dd1/modules/upgrade-diff.nix
diff = {
supportsDryActivation = true;
text = ''
${pkgs.nvd}/bin/nvd --nix-bin-dir=${pkgs.nix}/bin diff /run/current-system "$systemConfig"
'';
};
mkCcacheDirs = {
text = "install -d -m 0777 -o root -g nixbld /var/cache/ccache";
deps = [ ];
Expand Down

0 comments on commit 1ae2352

Please sign in to comment.