gate: add kunchenguid/no-mistakes for all Nix harnesses

- home.nix: add home.activation.noMistakes (declarative install to
  ~/.no-mistakes/bin + daemon via launchd, global config fallback
  agent: [pi, opencode, grok, claude, codex] covering every harness
  declared in Nix; fix shadowing of jonathanong npm no-mistakes)
- ~/.no-mistakes/config.yaml: switched from auto to ordered fallback,
  pi first (firstmate crewmates), then opencode/grok
- home/.pi/agent/*, home/.grok/config.toml, home/.config/opencode2:
  align to oMLX/qwen3.6-35b local model (was mixed Talos/genesis)
- rebuild.sh: ensure grok-build upgrade and OpenCode 1.x install on
  rebuild (stable CLI for free-tier, opencode2 beta is 426 there)
- dotfiles repo: no-mistakes init (gate at
  ~/.no-mistakes/repos/916cb6ded81b.git, remote no-mistakes)
This commit is contained in:
Lap Tran
2026-09-21 17:38:35 -04:00
parent 8bcc11c108
commit ab3b67af92
6 changed files with 91 additions and 181 deletions
+26
View File
@@ -1,10 +1,36 @@
#!/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).
set -euo pipefail
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
ln -sfn "$DIR" ~/.dotfiles
# Upgrade grok-build to latest (Homebrew cask).
# Skip if Homebrew API is unreachable (DNS/network issues).
echo "==> Upgrading grok-build..."
if brew upgrade grok-build 2>&1; then
echo "==> grok-build upgrade complete"
else
echo "==> WARNING: grok-build upgrade failed (network issue). Skipping."
fi
# Install OpenCode 1.x (stable CLI, binary "opencode") if absent.
# Required for free-tier models; opencode2 beta returns HTTP 426 on those endpoints.
# Uses Homebrew's npm (not Nix's npm) to avoid EACCES on the store.
# Skip if npm is unavailable (e.g., network issues preventing fetch).
OPENCODE_BIN=/opt/homebrew/bin/opencode
if [ ! -x "$OPENCODE_BIN" ]; then
echo "==> Installing OpenCode 1.x (stable) via Homebrew npm..."
if /opt/homebrew/bin/npm install -g --allow-scripts=opencode-ai opencode-ai@1.18 2>&1; then
echo "==> OpenCode 1.x installed successfully"
else
echo "==> WARNING: OpenCode 1.x installation failed (network issue). Skipping."
fi
else
echo "==> OpenCode 1.x already installed: $(${OPENCODE_BIN} --version)"
fi
stamp="$(date +%Y%m%d-%H%M%S)"
# Paths home-manager manages via home.file (regular files become out-of-store symlinks).
managed=(