diff --git a/configuration.nix b/configuration.nix index e5a11b4..88cea57 100644 --- a/configuration.nix +++ b/configuration.nix @@ -54,7 +54,8 @@ # resolves on the normal PATH. No server, service, database, or # connection is configured. { name = "libpq"; link = true; } - "node" # required: backpass and acpx are npm globals, not formulae + "node" # required: opencode-ai, backpass, and acpx are npm globals, + # not formulae # OpenCode 2 stable. Installed unlinked so it never replaces the # npm-installed OpenCode 1.x CLI at /opt/homebrew/bin/opencode (the crew # harness); home/bin/oc2 runs this keg binary directly. `link = false` diff --git a/home.nix b/home.nix index 507a39c..15cb24c 100644 --- a/home.nix +++ b/home.nix @@ -369,10 +369,8 @@ in "$HOME/.codex/config.toml" ''; - # OpenCode 2 is the stable Homebrew `opencode` formula declared in - # configuration.nix. It is installed unlinked so the OpenCode 1.x CLI keeps - # /opt/homebrew/bin/opencode; home/bin/oc2 runs the keg binary directly. - # Nothing to install here. + # OpenCode 2 is the stable Homebrew `opencode` formula, declared unlinked in + # configuration.nix; home/bin/oc2 runs its keg binary. Nothing to install here. # backpass (kunchenguid/backpass) - gradient descent for agent memory: reads # the transcript stores of the harnesses this config already declares diff --git a/home/bin/oc2 b/home/bin/oc2 index 2fed2d5..efde972 100755 --- a/home/bin/oc2 +++ b/home/bin/oc2 @@ -8,7 +8,7 @@ cfg="${OPENCODE_CONFIG:-$HOME/.config/opencode2/opencode.json}" if [ ! -x "$bin" ]; then echo "oc2: stable opencode not installed. Rebuild, or run:" >&2 - echo " brew install opencode" >&2 + echo " brew install opencode && brew unlink opencode" >&2 exit 1 fi if [ ! -e "$cfg" ]; then diff --git a/rebuild.sh b/rebuild.sh index 11f0139..f91948d 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -2,7 +2,8 @@ # Rebuild nix-darwin + home-manager. Rotates stale home-manager *.backup files # so a second switch never fails with "would be clobbered". # Also updates flake inputs, upgrades grok-build, installs OpenCode 1.x -# (stable CLI for free-tier), updates no-mistakes, and updates pi extensions. +# (stable CLI for free-tier), removes the retired OpenCode 2 npm beta, updates +# no-mistakes, and updates pi extensions. set -euo pipefail DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)" ln -sfn "$DIR" ~/.dotfiles