Nix
기준일: 2026-07-26
공식 기준: Nix
Nix 문서는 OpenClaw 공식 문서(install/nix)를 한국어로 정리한 가이드입니다. Install OpenClaw declaratively with Nix 명령·설정 키·코드 예시는 공식 문서를 그대로 보존하며, 해석과 절차 안내는 한국어로 제공합니다. 최종 동작은 설치된 CLI 버전과 공식 원문을 확인하세요.
핵심 요약
Install OpenClaw declaratively with Nix
한국어 가이드 범위: install/nix 경로의 설정·명령·제약·예시를 학습용으로 재구성합니다.
문서 구성
공식 문서의 주요 섹션은 다음과 같습니다.
- What you get
- 빠른 시작
- Nix-mode runtime behavior
- What changes in Nix mode
- Config and state paths
- Service PATH discovery
- 관련 문서
상세 내용
본문
Install OpenClaw declaratively with nix-openclaw, the first-party, batteries-included Home Manager module.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
What you get
주요 항목:
- Gateway + macOS app + tools (whisper, spotify, cameras), all pinned
- Launchd service that survives reboots
- Plugin system with declarative config
- Instant rollback:
home-manager switch --rollback
빠른 시작
If Nix is not already installed, follow the Determinate Nix installer instructions.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
mkdir -p ~/code/openclaw-local
# Copy templates/agent-first/flake.nix from the nix-openclaw repo
home-manager switch
Nix-mode runtime behavior
When OPENCLAW_NIX_MODE=1 is set (automatic with nix-openclaw), OpenClaw enters a deterministic mode for Nix-managed installs. Other Nix packages can set the same mode; nix-openclaw is the first-party reference.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
defaults write ai.openclaw.mac openclaw.nixMode -bool true
What changes in Nix mode
주요 항목:
- Auto-install and self-mutation flows are disabled.
openclaw.jsonis treated as immutable. Startup-derived defaults stay runtime-only, and config writers (setup, onboarding, mutatingopenclaw update, plugin install/update/uninstall/enable,doctor --fix,doctor --generate-gateway-token,openclaw config set) refuse to edit the file.- Edit the Nix source instead. For nix-openclaw, use the agent-first Quick Start and set config under
programs.openclaw.configorinstances.<name>.config. - Missing dependencies surface Nix-specific remediation messages.
- The UI shows a read-only Nix mode banner.
Config and state paths
OpenClaw reads JSON5 config from OPENCLAW_CONFIG_PATH and stores mutable data in OPENCLAW_STATE_DIR. Under Nix, set these explicitly to Nix-managed locations so runtime state and config stay out of the immutable store.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
| Variable | Default |
|---|---|
OPENCLAW_HOME |
HOME / USERPROFILE / os.homedir() |
OPENCLAW_STATE_DIR |
~/.openclaw |
OPENCLAW_CONFIG_PATH |
$OPENCLAW_STATE_DIR/openclaw.json |
Service PATH discovery
The launchd/systemd gateway service auto-discovers Nix-profile binaries so plugins and tools that shell out to nix-installed executables work without manual PATH setup:
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
주요 항목:
- When
NIX_PROFILESis set, every entry is added to the service PATH in right-to-left precedence (matches Nix shell precedence: rightmost wins). - When
NIX_PROFILESis unset,~/.nix-profile/binis added as a fallback.
관련 문서
Source-of-truth Home Manager module and full setup guide.
위 내용은 공식 문서의 해당 섹션 요지입니다. 세부 플래그·기본값은 원문과
--help를 확인하세요.
실습 체크리스트
- 공식 문서와 로컬 버전을 대조합니다:
https://docs.openclaw.ai/install/nix - 관련 CLI는
openclaw --help및 하위 명령--help로 옵션을 확인합니다. - 설정 변경 시
openclaw config/openclaw doctor로 유효성을 검사합니다. - Gateway·채널·플러그인 변경 후에는 필요 시 Gateway를 재시작합니다.
자주 쓰는 명령·설정 예시
mkdir -p ~/code/openclaw-local
# Copy templates/agent-first/flake.nix from the nix-openclaw repo
home-manager switch
defaults write ai.openclaw.mac openclaw.nixMode -bool true
관련 링크
- 공식 원문: install/nix
- OpenClaw 문서 홈
이 가이드는 공식 문서를 한국어 학습용으로 재구성한 것입니다. 옵션 기본값·플래그 이름은 설치 버전에 따라 달라질 수 있습니다.