Community translations by veiseule.ai — Help improve them on Crowdin
Skip to main content

Pag-install ng Nix

Ang inirerekomendang paraan para patakbuhin ang OpenClaw gamit ang Nix ay sa pamamagitan ng nix-openclaw — isang Home Manager module na kumpleto na ang lahat (batteries-included).

Mabilis na pagsisimula

I-paste ito sa iyong AI agent (Claude, Cursor, atbp.):

I want to set up nix-openclaw on my Mac.
Repository: github:openclaw/nix-openclaw

What I need you to do:
1. Check if Determinate Nix is installed (if not, install it)
2. Create a local flake at ~/code/openclaw-local using templates/agent-first/flake.nix
3. Help me create a Telegram bot (@BotFather) and get my chat ID (@userinfobot)
4. Set up secrets (bot token, Anthropic key) - plain files at ~/.secrets/ is fine
5. Fill in the template placeholders and run home-manager switch
6. Verify: launchd running, bot responds to messages

Reference the nix-openclaw README for module options.

📦 Buong gabay: github.com/openclaw/nix-openclaw

Ang nix-openclaw repo ang source of truth para sa pag-install ng Nix. Ang pahinang ito ay isang mabilis na overview lamang.

Ano ang makukuha mo

  • Gateway + macOS app + mga tool (whisper, spotify, cameras) — lahat ay naka-pin
  • Launchd service na tumatagal kahit mag-reboot
  • Plugin system na may deklaratibong config
  • Agarang rollback: home-manager switch --rollback

Runtime Behavior ng Nix Mode

Kapag naka-set ang OPENCLAW_NIX_MODE=1 (awtomatiko gamit ang nix-openclaw):

Sinusuportahan ng OpenClaw ang isang Nix mode na ginagawang deterministic ang configuration at dini-disable ang mga auto-install flow. I-enable ito sa pamamagitan ng pag-export ng:

OPENCLAW_NIX_MODE=1

Sa macOS, hindi awtomatikong namamana ng GUI app ang mga shell env var. Maaari mo ring paganahin ang Nix mode sa pamamagitan ng defaults:

defaults write bot.molt.mac openclaw.nixMode -bool true

Mga path ng config + state

Binabasa ng OpenClaw ang JSON5 config mula sa OPENCLAW_CONFIG_PATH at iniimbak ang mutable na data sa OPENCLAW_STATE_DIR. When needed, you can also set OPENCLAW_HOME to control the base home directory used for internal path resolution.

  • OPENCLAW_HOME (default precedence: HOME / USERPROFILE / os.homedir())
  • OPENCLAW_STATE_DIR (default: ~/.openclaw)
  • OPENCLAW_CONFIG_PATH (default: $OPENCLAW_STATE_DIR/openclaw.json)

Kapag tumatakbo sa ilalim ng Nix, itakda ang mga ito nang tahasan sa mga lokasyong pinamamahalaan ng Nix upang ang runtime state at config ay manatili sa labas ng immutable store.

Runtime behavior sa Nix mode

  • Ang mga auto-install at self-mutation flow ay dini-disable
  • Ang mga nawawalang dependency ay nagpapakita ng mga Nix-specific na remediation message
  • Ang UI ay nagpapakita ng read-only na Nix mode banner kapag naroroon

Tala sa packaging (macOS)

Inaasahan ng macOS packaging flow ang isang stable na Info.plist template sa:

apps/macos/Sources/OpenClaw/Resources/Info.plist

scripts/package-mac-app.sh ay kinokopya ang template na ito sa app bundle at pinapatch ang mga dynamic na field (bundle ID, version/build, Git SHA, Sparkle keys). Pinananatili nitong deterministic ang plist para sa SwiftPM packaging at mga Nix build (na hindi umaasa sa isang buong Xcode toolchain).

Kaugnay