diff options
author | Mark Nipper <nipsy@bitgnome.net> | 2024-04-14 04:37:51 -0700 |
---|---|---|
committer | Mark Nipper <nipsy@bitgnome.net> | 2024-04-14 04:37:51 -0700 |
commit | 853984814b50305386fa531dbc2ebb2c2c65af42 (patch) | |
tree | 2c914de2eacb2a328d2693730bf5130fbaf76920 /scripts | |
parent | dc9d92e09218688e3a3f15d5cd728e7c035391cb (diff) | |
download | nix-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
Diffstat (limited to '')
-rwxr-xr-x | scripts/pretty-rebuild | 16 |
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 |