summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-18 13:57:52 +0000
committertv <tv@krebsco.de>2026-11-18 15:03:33 +0100
commit9597ddad9199b3f167587fae63018f912e42c426 (patch)
tree6e0eeeb124b54e30ba83b7b6ceb96d8c069eff8f
parenta6332207bd1c5ceb50fc796f83945a33e38be24a (diff)
krops: diff derivations in the diff action
diff-closures only shows version changes and size changes of 8 KiB or more, so configuration changes go unseen. nix-diff shows them. It comes from nix-shell -p with the target's nixpkgs if the target doesn't have it.
-rw-r--r--krops.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/krops.nix b/krops.nix
index d9885f8..1bd24c5 100644
--- a/krops.nix
+++ b/krops.nix
@@ -95,6 +95,13 @@
diff = /* sh */ ''
nix --extra-experimental-features nix-command \
store diff-closures /run/current-system "$system"
+ if command -v nix-diff >/dev/null; then
+ nix-diff --skip-already-compared /run/current-system "$system"
+ else
+ NIX_PATH=${lib.escapeShellArg target'.path} \
+ nix-shell -p nix-diff --run \
+ "nix-diff --skip-already-compared /run/current-system $system"
+ fi
"$system"/bin/switch-to-configuration dry-activate
'';
}}