Nix Installation
The recommended way to run GenSparx with Nix is via nix-GenSparx — a batteries-included Home Manager module.Quick Start
Paste this to your AI agent (Claude, Cursor, etc.):📦 Full guide: github.com/GenSparx/nix-GenSparx The nix-GenSparx repo is the source of truth for Nix installation. This page is just a quick overview.
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
Nix Mode Runtime Behavior
WhenOPENCLAW_NIX_MODE=1 is set (automatic with nix-GenSparx):
GenSparx supports a Nix mode that makes configuration deterministic and disables auto-install flows.
Enable it by exporting:
Config + state paths
GenSparx reads JSON5 config fromOPENCLAW_CONFIG_PATH and stores mutable data in OPENCLAW_STATE_DIR.
OPENCLAW_STATE_DIR(default:~/.openclaw)OPENCLAW_CONFIG_PATH(default:$OPENCLAW_STATE_DIR/openclaw.json)
Runtime behavior in Nix mode
- Auto-install and self-mutation flows are disabled
- Missing dependencies surface Nix-specific remediation messages
- UI surfaces a read-only Nix mode banner when present
Packaging note (macOS)
The macOS packaging flow expects a stable Info.plist template at:scripts/package-mac-app.sh copies this template into the app bundle and patches dynamic fields
(bundle ID, version/build, Git SHA, Sparkle keys). This keeps the plist deterministic for SwiftPM
packaging and Nix builds (which do not rely on a full Xcode toolchain).
Related
- nix-GenSparx — full setup guide
- Wizard — non-Nix CLI setup
- Docker — containerized setup