fix: install.sh 路径改为 ~/Developer,首次 bootstrap 自动检测 darwin-rebuild
This commit is contained in:
@@ -1,15 +1,13 @@
|
|||||||
---
|
---
|
||||||
active: true
|
active: true
|
||||||
iteration: 2
|
iteration: 3
|
||||||
max_iterations: 500
|
max_iterations: 500
|
||||||
completion_promise: "VERIFIED"
|
completion_promise: "DONE"
|
||||||
initial_completion_promise: "DONE"
|
initial_completion_promise: "DONE"
|
||||||
verification_attempt_id: "8bd02d34-4ca9-4686-b3ad-ae8a2330ad40"
|
started_at: "2026-04-10T15:59:34.105Z"
|
||||||
started_at: "2026-04-10T15:43:59.279Z"
|
|
||||||
session_id: "ses_28863d32affeOW6Iiz2415uZSk"
|
session_id: "ses_28863d32affeOW6Iiz2415uZSk"
|
||||||
ultrawork: true
|
ultrawork: true
|
||||||
verification_pending: true
|
|
||||||
strategy: "continue"
|
strategy: "continue"
|
||||||
message_count_at_start: 169
|
message_count_at_start: 191
|
||||||
---
|
---
|
||||||
Complete the task as instructed
|
Complete the task as instructed
|
||||||
|
|||||||
+7
-2
@@ -2,18 +2,23 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
REPO_URL="https://git.furtherverse.com/imbytecat/nix-config.git"
|
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
|
if [[ -d "$CONFIG_DIR/.git" ]]; then
|
||||||
git -C "$CONFIG_DIR" pull
|
git -C "$CONFIG_DIR" pull
|
||||||
else
|
else
|
||||||
|
mkdir -p "$HOME/Developer"
|
||||||
git clone "$REPO_URL" "$CONFIG_DIR"
|
git clone "$REPO_URL" "$CONFIG_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$(uname)" in
|
case "$(uname)" in
|
||||||
Darwin)
|
Darwin)
|
||||||
TARGET="${1:?Usage: $0 <mac-mini|macbook-air>}"
|
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)
|
Linux)
|
||||||
sudo nixos-rebuild switch --flake "$CONFIG_DIR#wsl"
|
sudo nixos-rebuild switch --flake "$CONFIG_DIR#wsl"
|
||||||
|
|||||||
Reference in New Issue
Block a user