summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
'';
}}