rebuild.sh: update flake inputs on every rebuild

This commit is contained in:
Lap Tran committed 2026-11-06 18:04:05 -05:00
1 parent b4120aaf88
commit f7411c2ade
2 files changed
+25 -17

No files matched your search

+9 -1
View File
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
# Rebuild nix-darwin + home-manager. Rotates stale home-manager *.backup files
# so a second switch never fails with "would be clobbered".
# Also upgrades grok-build and installs OpenCode 1.x (stable CLI for free-tier).
# Also updates flake inputs, upgrades grok-build, installs OpenCode 1.x
# (stable CLI for free-tier), and updates no-mistakes.
set -euo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
ln -sfn "$DIR" ~/.dotfiles
@@ -92,4 +93,11 @@ do
fi
done
echo "==> Updating flake inputs..."
if nix flake update --flake ~/.dotfiles 2>&1; then
echo "==> flake update complete"
else
echo "==> WARNING: flake update failed. Continuing with locked inputs."
fi
exec sudo darwin-rebuild switch --flake ~/.dotfiles#lt-mbp