no-mistakes(document): Clarify rebuild updates and check guidance
This commit is contained in:
1 parent
022967e277
commit
ad55229df8
4 files changed
+73
-22
No files matched your search
+12
-13
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Rebuild nix-darwin + home-manager from this checkout.
|
||||
#
|
||||
# Before the switch, update every installed component that is not declarative:
|
||||
# Before the switch, update the non-declarative tools listed below:
|
||||
# npm globals (through Homebrew's node, never Nix's npm), no-mistakes,
|
||||
# Hermes Agent, and the flake inputs. After the switch,
|
||||
# update the installed agent skills and Pi extensions against the upgraded
|
||||
@@ -9,15 +9,15 @@
|
||||
#
|
||||
# Rotates stale home-manager *.backup files before the switch so a second switch
|
||||
# never fails with "would be clobbered".
|
||||
# Every update step is idempotent and warns when its tool or network is absent,
|
||||
# so one missing updater never aborts the rebuild.
|
||||
# Optional updater failures warn and allow the rebuild to continue.
|
||||
# A failed switch stops the script before post-switch updates.
|
||||
set -euo pipefail
|
||||
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
||||
ln -sfn "$DIR" ~/.dotfiles
|
||||
NPM=/opt/homebrew/bin/npm
|
||||
|
||||
# npm globals are installed outside Nix and Homebrew, so no other step moves
|
||||
# them. Use /opt/homebrew/bin/npm explicitly: the activation PATH can resolve
|
||||
# The npm globals listed below have no declarative updater.
|
||||
# Use /opt/homebrew/bin/npm explicitly: the activation PATH can resolve
|
||||
# Nix's npm, which cannot write the Homebrew prefix, and these packages belong to
|
||||
# Homebrew's node. Each package is compared with the registry first, so a current
|
||||
# copy is left alone and a failed lookup or install only warns.
|
||||
@@ -61,8 +61,8 @@ process.stdin.on("end", () => {
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
# tasks-axi is also gated by home.nix (firstmate needs >= 0.2.6). Update it
|
||||
# here so it reaches the latest release; the activation only fills a gap.
|
||||
# home.activation.axiTools enforces the tasks-axi minimum without downgrades,
|
||||
# so a newer release installed here survives the switch.
|
||||
npm_globals=(
|
||||
"@steipete/bird"
|
||||
chrome-devtools-axi
|
||||
@@ -128,7 +128,7 @@ fi
|
||||
# Hermes Agent is a mutable git clone at ~/.hermes/hermes-agent, so Nix and
|
||||
# Homebrew never move it. Its own updater pulls the configured channel and
|
||||
# restarts the services that run its new code; --yes keeps the rebuild
|
||||
# non-interactive. A failure leaves the installed version in place.
|
||||
# non-interactive.
|
||||
echo "==> Updating Hermes Agent..."
|
||||
if ! command -v hermes >/dev/null 2>&1; then
|
||||
echo "==> WARNING: hermes not found. Skipping update."
|
||||
@@ -139,7 +139,7 @@ else
|
||||
fi
|
||||
|
||||
stamp="$(date +%Y%m%d-%H%M%S)"
|
||||
# Paths home-manager manages via home.file (regular files become out-of-store symlinks).
|
||||
# Paths managed by home.file, including config links and Nix package binaries.
|
||||
managed=(
|
||||
"$HOME/.grok/config.toml"
|
||||
"$HOME/.grok/AGENTS.md"
|
||||
@@ -193,10 +193,9 @@ fi
|
||||
|
||||
sudo darwin-rebuild switch --flake ~/.dotfiles#lt-mbp
|
||||
|
||||
# Update installed agent skills after the switch. The Skills CLI tracks most of
|
||||
# ~/.agents/skills through its lock file; the pinned pstack skills are not in
|
||||
# that lock, so they stay on the home.nix revision. security-audit is skipped on
|
||||
# purpose: home.nix freezes it so a rebuild never pulls a new skill mid-session.
|
||||
# Update tracked skills after activation. Exclude security-audit to preserve
|
||||
# home.activation.securityAuditSkill's freeze policy. Untracked skills,
|
||||
# including the pinned pstack copies, are outside this updater's scope.
|
||||
echo "==> Updating agent skills..."
|
||||
NPX=/opt/homebrew/bin/npx
|
||||
SKILL_LOCK="$HOME/.agents/.skill-lock.json"
|
||||
|
||||
Reference in new issue
Block a user