Show system closure diff on activation

This commit is contained in:
Simon Bruder 2021-04-25 09:50:03 +02:00
parent 78f4579556
commit 8a339c51a2
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC

View file

@ -95,6 +95,13 @@
acceptTerms = true; acceptTerms = true;
email = "security@sbruder.de"; email = "security@sbruder.de";
}; };
system.activationScripts.diff = ''
[ -L /run/current-system ] && ${pkgs.nixUnstable}/bin/nix \
--experimental-features 'nix-command' \
store \
diff-closures /run/current-system "$systemConfig"
'';
} }
(lib.mkIf (!config.sbruder.full) { (lib.mkIf (!config.sbruder.full) {
# Adapted from nixpkgs/nixos/modules/profiles/minimal.nix # Adapted from nixpkgs/nixos/modules/profiles/minimal.nix