# Nix Installation Documentation ## Overview The documentation describes setting up OpenClaw using Nix, with the primary recommended method being **nix-openclaw**, a Home Manager module that provides a pre-configured environment. ## Key Setup Method Users are directed to paste instructions into an AI agent, which should: 1. Verify Determinate Nix installation 2. Create a local flake configuration using provided templates 3. Set up a Telegram bot with necessary credentials 4. Configure secrets management 5. Apply configuration via home-manager 6. Verify the launchd service is running ## What's Included The nix-openclaw setup provides Gateway + macOS app + tools (whisper, spotify, cameras) — all pinned with automatic service persistence and plugin configuration capabilities. ## Nix Mode Runtime When `OPENCLAW_NIX_MODE=1` is enabled (automatic with nix-openclaw): - Configuration becomes deterministic and auto-install flows are disabled - State and configuration use explicit paths via environment variables - The macOS GUI app can enable this mode through system defaults - Missing dependencies trigger Nix-specific error messages ## File Paths State and configuration directories are configurable: - `OPENCLAW_STATE_DIR` (default: `~/.openclaw`) - `OPENCLAW_CONFIG_PATH` (default: `$OPENCLAW_STATE_DIR/openclaw.json`) ## Related Resources The documentation references the nix-openclaw GitHub repository as the authoritative source, alongside alternative installation methods for non-Nix and containerized setups.