From a485d30c0b27b17c12a754e84fc6dea5b5e4e6e2 Mon Sep 17 00:00:00 2001 From: Astro Date: Tue, 19 Apr 2022 20:03:59 +0200 Subject: [PATCH] modules/autoupdate: add package diff to activationScripts --- modules/autoupdate.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/autoupdate.nix b/modules/autoupdate.nix index 988299c5..559e2ca8 100644 --- a/modules/autoupdate.nix +++ b/modules/autoupdate.nix @@ -59,6 +59,15 @@ randomizedDelaySec = "6h"; }; + # Always show a diff when activating a new system + system.activationScripts.diff-system = { + supportsDryActivation = true; + text = '' + echo System package diff: + ${config.nix.package}/bin/nix store diff-closures /run/current-system $systemConfig + ''; + }; + environment.systemPackages = [ ( # Provide a manual updating script that fetches the latest # updated+built system from Hydra