






















@@ -7,22 +7,20 @@ read_when:
77title: "Nix"
88---
9910-# Nix Installation
11-12-Install OpenClaw declaratively with **[nix-openclaw](https://github.com/openclaw/nix-openclaw)** -- a batteries-included Home Manager module.
10+Install OpenClaw declaratively with **[nix-openclaw](https://github.com/openclaw/nix-openclaw)** — a batteries-included Home Manager module.
13111412<Info>
1513The [nix-openclaw](https://github.com/openclaw/nix-openclaw) repo is the source of truth for Nix installation. This page is a quick overview.
1614</Info>
171518-## What You Get
16+## What you get
19172018- Gateway + macOS app + tools (whisper, spotify, cameras) -- all pinned
2119- Launchd service that survives reboots
2220- Plugin system with declarative config
2321- Instant rollback: `home-manager switch --rollback`
242225-## Quick Start
23+## Quick start
26242725<Steps>
2826<Step title="Install Determinate Nix">
@@ -50,7 +48,7 @@ The [nix-openclaw](https://github.com/openclaw/nix-openclaw) repo is the source
50485149See the [nix-openclaw README](https://github.com/openclaw/nix-openclaw) for full module options and examples.
525053-## Nix Mode Runtime Behavior
51+## Nix-mode runtime behavior
54525553When `OPENCLAW_NIX_MODE=1` is set (automatic with nix-openclaw), OpenClaw enters a deterministic mode that disables auto-install flows.
5654@@ -82,6 +80,18 @@ OpenClaw reads JSON5 config from `OPENCLAW_CONFIG_PATH` and stores mutable data
8280| `OPENCLAW_STATE_DIR` | `~/.openclaw` |
8381| `OPENCLAW_CONFIG_PATH` | `$OPENCLAW_STATE_DIR/openclaw.json` |
848283+### Service PATH discovery
84+85+The launchd/systemd gateway service auto-discovers Nix-profile binaries so
86+plugins and tools that shell out to `nix`-installed executables work without
87+manual PATH setup:
88+89+- When `NIX_PROFILES` is set, every entry is added to the service PATH in
90+ right-to-left precedence (matches Nix shell precedence — rightmost wins).
91+- When `NIX_PROFILES` is unset, `~/.nix-profile/bin` is added as a fallback.
92+93+This applies to both macOS launchd and Linux systemd service environments.
94+8595## Related
86968797- [nix-openclaw](https://github.com/openclaw/nix-openclaw) -- full setup guide
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。