aboutsummaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--README2
1 files changed, 1 insertions, 1 deletions
diff --git a/README b/README
index 4384a3b..49ae434 100644
--- a/README
+++ b/README
@@ -57,7 +57,7 @@ nix-channel --add https://nixos.org/channels/nixos-unstable nixos
nixos-rebuild switch --upgrade
# later upgrades after flakes are enabled
-cd /etc/nixos && nix flake update && cd && nixos-rebuild switch --upgrade && echo && nixos-rebuild list-generations | cat && echo && nix store diff-closures $(find /nix/var/nix/profiles -iname system-\* -type l | sort | tail -2 | xargs)
+cd /etc/nixos && nix flake update && cd && nixos-rebuild switch --upgrade && echo && nixos-rebuild list-generations | cat && echo && res=$(find /nix/var/nix/profiles -iname system-\* -type l | sort | tail -2); if [[ $(echo -E "${res}" | wc -l) -eq 2 ]]; then echo "+ diff between $(echo -E "${res}" | xargs)\n"; nix store diff-closures $(echo -E "${res}" | xargs); fi
# clean up all but the two most recent systems
nixos-rebuild list-generations | cat