aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Nipper <nipsy@bitgnome.net>2024-04-14 04:37:51 -0700
committerMark Nipper <nipsy@bitgnome.net>2024-04-14 04:37:51 -0700
commit853984814b50305386fa531dbc2ebb2c2c65af42 (patch)
tree2c914de2eacb2a328d2693730bf5130fbaf76920
parentdc9d92e09218688e3a3f15d5cd728e7c035391cb (diff)
downloadnix-853984814b50305386fa531dbc2ebb2c2c65af42.tar
nix-853984814b50305386fa531dbc2ebb2c2c65af42.tar.gz
nix-853984814b50305386fa531dbc2ebb2c2c65af42.tar.bz2
nix-853984814b50305386fa531dbc2ebb2c2c65af42.tar.lz
nix-853984814b50305386fa531dbc2ebb2c2c65af42.tar.xz
nix-853984814b50305386fa531dbc2ebb2c2c65af42.tar.zst
nix-853984814b50305386fa531dbc2ebb2c2c65af42.zip
Add more verbose rebuild script
-rwxr-xr-xscripts/pretty-rebuild16
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/pretty-rebuild b/scripts/pretty-rebuild
new file mode 100755
index 0000000..30025bb
--- /dev/null
+++ b/scripts/pretty-rebuild
@@ -0,0 +1,16 @@
+#!/usr/bin/env nix-shell
+#!nix-shell -i zsh --packages zsh
+
+cd /etc/nixos && \
+ nix flake update && \
+ cd && \
+ nixos-rebuild switch --upgrade --show-trace && \
+ echo && \
+ nixos-rebuild list-generations | cat && \
+ echo && \
+ res=$(find /nix/var/nix/profiles -iname system-\* -type l | sort | tail -2)
+
+if [[ ${?} -eq 0 && $(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