From 853984814b50305386fa531dbc2ebb2c2c65af42 Mon Sep 17 00:00:00 2001 From: Mark Nipper Date: Sun, 14 Apr 2024 04:37:51 -0700 Subject: Add more verbose rebuild script --- scripts/pretty-rebuild | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 scripts/pretty-rebuild (limited to 'scripts') 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 -- cgit v1.2.3