generation 580 25.11.20250714.62e0f05

This commit is contained in:
2026-02-28 02:31:30 -05:00
parent c7802877e3
commit adb08fb062
2 changed files with 27 additions and 0 deletions

26
home/scripts/nix-diff.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/usr/bin/env bash
# shows what changed between the current and previous NixOS generation
PROFILE="/nix/var/nix/profiles/system"
# current generation number from the profile symlink (e.g. system-185-link)
current_gen=$(readlink "$PROFILE" | grep -oP '\d+')
prev_gen=$((current_gen - 1))
current=$(readlink -f "${PROFILE}-${current_gen}-link")
previous=$(readlink -f "${PROFILE}-${prev_gen}-link")
if [ ! -e "${PROFILE}-${prev_gen}-link" ]; then
echo "Previous generation ($prev_gen) not found (garbage collected?)."
exit 1
fi
echo -e "\033[1mGen $prev_gen:\033[0m $previous"
echo -e "\033[1mGen $current_gen:\033[0m $current"
echo
if command -v nvd &>/dev/null; then
nvd diff "$previous" "$current"
else
nix store diff-closures "$previous" "$current"
fi