Skip to content

Commit

Permalink
feat: add upgrade-diff.nix
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaxbits committed Nov 3, 2023
1 parent 1b3ebf1 commit 06b3d3f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
./git.nix
./nix.nix
./fish.nix
./upgrade-diff.nix
];

config = {
Expand Down
17 changes: 17 additions & 0 deletions common/upgrade-diff.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# MIT Jörg Thalheim - https://github.com/Mic92/dotfiles/blob/c6cad4e57016945c4816c8ec6f0a94daaa0c3203/nixos/modules/upgrade-diff.nix
{
config,
pkgs,
...
}: {
system.activationScripts.diff = {
supportsDryActivation = true;
text = ''
if [[ -e /run/current-system ]]; then
echo "--- diff to current-system"
${pkgs.nvd}/bin/nvd --nix-bin-dir=${config.nix.package}/bin diff /run/current-system "$systemConfig"
echo "---"
fi
'';
};
}

0 comments on commit 06b3d3f

Please sign in to comment.