fix: install.sh 路径改为 ~/Developer,首次 bootstrap 自动检测 darwin-rebuild

This commit is contained in:
2026-04-11 00:03:21 +08:00
parent e9146a4e4d
commit 52836c0490
2 changed files with 11 additions and 8 deletions
+4 -6
View File
@@ -1,15 +1,13 @@
---
active: true
iteration: 2
iteration: 3
max_iterations: 500
completion_promise: "VERIFIED"
completion_promise: "DONE"
initial_completion_promise: "DONE"
verification_attempt_id: "8bd02d34-4ca9-4686-b3ad-ae8a2330ad40"
started_at: "2026-04-10T15:43:59.279Z"
started_at: "2026-04-10T15:59:34.105Z"
session_id: "ses_28863d32affeOW6Iiz2415uZSk"
ultrawork: true
verification_pending: true
strategy: "continue"
message_count_at_start: 169
message_count_at_start: 191
---
Complete the task as instructed
+7 -2
View File
@@ -2,18 +2,23 @@
set -euo pipefail
REPO_URL="https://git.furtherverse.com/imbytecat/nix-config.git"
CONFIG_DIR="$HOME/.config/nix-config"
CONFIG_DIR="$HOME/Developer/nix-config"
if [[ -d "$CONFIG_DIR/.git" ]]; then
git -C "$CONFIG_DIR" pull
else
mkdir -p "$HOME/Developer"
git clone "$REPO_URL" "$CONFIG_DIR"
fi
case "$(uname)" in
Darwin)
TARGET="${1:?Usage: $0 <mac-mini|macbook-air>}"
darwin-rebuild switch --flake "$CONFIG_DIR#$TARGET"
if command -v darwin-rebuild &>/dev/null; then
sudo darwin-rebuild switch --flake "$CONFIG_DIR#$TARGET"
else
sudo nix run nix-darwin -- switch --flake "$CONFIG_DIR#$TARGET"
fi
;;
Linux)
sudo nixos-rebuild switch --flake "$CONFIG_DIR#wsl"