Add upgrade-diff
This commit is contained in:
parent
a2c01c0fda
commit
1b9d7745f4
2 changed files with 15 additions and 0 deletions
|
|
@ -49,6 +49,7 @@
|
||||||
./udmx.nix
|
./udmx.nix
|
||||||
./uefi.nix
|
./uefi.nix
|
||||||
./unfree.nix
|
./unfree.nix
|
||||||
|
./upgrade-diff.nix
|
||||||
./wireshark.nix
|
./wireshark.nix
|
||||||
./yubikey-gpg.nix
|
./yubikey-gpg.nix
|
||||||
];
|
];
|
||||||
|
|
|
||||||
14
modules/upgrade-diff.nix
Normal file
14
modules/upgrade-diff.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# 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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue