Nix-Installation
Der empfohlene Weg, OpenClaw mit Nix auszuführen, ist über nix-openclaw — ein Batteries-included Home Manager-Modul.
Schnellstart
Füge dies in deinen KI-Agenten (Claude, Cursor usw.) ein:
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, model provider API 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.
📦 Vollständige Anleitung: github.com/openclaw/nix-openclaw
Das nix-openclaw-Repository ist die Referenzquelle für die Nix-Installation. Diese Seite ist nur ein kurzer Überblick.
Was du bekommst
- Gateway + macOS-App + Tools (whisper, spotify, cameras) — alles gepinnt
- Launchd-Service der Neustarts überlebt
- Plugin-System mit deklarativer Config
- Sofortiger Rollback:
home-manager switch --rollback
Nix-Modus Runtime-Verhalten
Wenn OPENCLAW_NIX_MODE=1 gesetzt ist (automatisch bei nix-openclaw):
OpenClaw unterstützt einen Nix-Modus, der die Konfiguration deterministisch macht und Auto-Install-Abläufe deaktiviert.
OPENCLAW_NIX_MODE=1
Auf macOS erbt die GUI-App Shell-Umgebungsvariablen nicht automatisch. Du kannst den Nix-Modus auch per defaults aktivieren:
defaults write ai.openclaw.mac openclaw.nixMode -bool true
Config- + Status-Pfade
OPENCLAW_HOME(Standard-Priorität:HOME/USERPROFILE/os.homedir())OPENCLAW_STATE_DIR(Standard:~/.openclaw)OPENCLAW_CONFIG_PATH(Standard:$OPENCLAW_STATE_DIR/openclaw.json)
Unter Nix solltest du diese explizit auf Nix-verwaltete Orte setzen.
Runtime-Verhalten im Nix-Modus
- Auto-Install- und Selbst-Mutations-Abläufe sind deaktiviert
- Fehlende Abhängigkeiten zeigen Nix-spezifische Korrekturhinweise
- Die UI zeigt ein Read-Only-Nix-Modus-Banner
Verwandt
- nix-openclaw — vollständige Setup-Anleitung
- Wizard — Nicht-Nix CLI-Setup
- Docker — containerisiertes Setup