summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-18 14:24:53 +0000
committertv <tv@krebsco.de>2026-11-18 15:32:41 +0100
commit802c90f2817c747ef62b35beff7b635e7f4ef474 (patch)
tree031cf610bcd631b04fe0e20f5ad981d0ae85fdc8
parent9597ddad9199b3f167587fae63018f912e42c426 (diff)
krops: diff environments in the diff action too
Without --environment, nix-diff skips the environment of a derivation when one of its inputs changed. A unit whose X-Restart-Triggers input changes then hides its own changes, e.g. a new RefreshOnReload= next to a changed config file.
-rw-r--r--krops.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/krops.nix b/krops.nix
index 1bd24c5..6f7858d 100644
--- a/krops.nix
+++ b/krops.nix
@@ -96,11 +96,11 @@
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"
+ nix-diff --environment --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"
+ "nix-diff --environment --skip-already-compared /run/current-system $system"
fi
"$system"/bin/switch-to-configuration dry-activate
'';