An AI-powered macOS configuration manager built on nix-darwin.
Describe what you want in plain English. nixmac evolves your Nix config, builds it, and applies it.
nixmac is a native macOS app (Tauri + Rust) that puts an AI agent in front of your nix-darwin configuration. Instead of hand-editing .nix files, you chat with nixmac:
"Install Tailscale and make it start at login"
The agent reads your config, plans the changes, edits the Nix files, builds the system, and applies it — all while you watch. If something breaks, roll back in one click.
- Natural-language config evolution — an agentic loop with tool use (read, edit, search) that iterates until your system matches the prompt
- Multi-provider AI — OpenAI/OpenRouter (default), Ollama for fully local operation
- Tool-augmented agent —
read_file,write_file,search_packages,search_docs,search_codetools give the model deep context about nix-darwin options and nixpkgs - Chat memory — session context persists across turns for multi-step conversations
- Smart summarization — every changeset and commit gets an AI-generated summary with token-budgeted batching
- Git-native history — every evolution creates a branch, every apply is a commit; full diff-based change tracking
- One-click rollback — revert to any previous system generation
- Secret scanning — detects accidentally committed API keys and credentials
- Sentry integration — opt-in crash reporting with automatic PII scrubbing
- CLI + GUI — use the menu bar app or
nixmac evolve "..."from the terminal - Eval suite — reproducible benchmarks for measuring agent accuracy across models
nixmac/
├── apps/
│ ├── native/ # Tauri + Rust desktop app (core agent, tools, git, nix)
│ ├── web/ # React + TanStack Router frontend (dashboard, onboarding)
│ ├── server/ # Hono + tRPC API server
│ ├── fumadocs/ # Documentation site (Next.js / Fumadocs)
│ └── eval/ # Python eval harness for model benchmarking
├── packages/
│ ├── api/ # Shared business logic
│ ├── auth/ # Better-Auth configuration
│ ├── db/ # Drizzle ORM + PostgreSQL schema
│ ├── ui/ # Shared UI components
│ ├── config/ # Shared config utilities
│ ├── env/ # Environment variable validation
│ ├── hono-api/ # Hono middleware and API helpers
│ └── znv/ # Zod + env parsing
- User prompt → agent receives the request
- Tool use → agent reads config files, searches nix-darwin docs, searches nixpkgs
- Edit → agent writes changes via semantic file edits
- Build →
darwin-rebuild buildvalidates the configuration - Iterate → if the build fails, agent reads errors and tries again (up to N iterations)
- Apply →
darwin-rebuild switchactivates the new system generation - Summarize → changeset and commit get AI-generated descriptions
- macOS (Apple Silicon or Intel)
- Nix with flakes enabled (Determinate Nix Installer recommended)
- devenv —
nix profile add github:cachix/devenv/latest - A nix-darwin flake at
~/.darwin(see Setup Guide below)
Download the latest .dmg from Releases, open it, and drag nixmac.app into your Applications folder before launching it. Running nixmac directly from the DMG triggers macOS App Translocation, which prevents Full Disk Access from being granted.
git clone https://github.com/darkmatter/nixmac.git
cd nixmac
devenv shell
bun install
cd apps/native && bun run tauri build --bundles appdevenv shell
bun install
# Start everything (web + server + native app in dev mode)
devenv up
# Or start individual pieces
bun run dev:web # React frontend at http://localhost:3001
bun run dev:server # API server at http://localhost:3000
bun run dev:native # Tauri desktop appIf you don't already have a nix-darwin configuration:
mkdir -p ~/.darwin && cd ~/.darwin
git initCopy one of the included templates:
| Template | Description |
|---|---|
nix-darwin-determinate |
Minimal nix-darwin for Determinate Nix |
nixos-unified |
Cross-platform (macOS + NixOS) |
minimal |
Bare-bones starting point |
Then activate:
sudo cp /etc/{bashrc,zshrc,zshenv} /etc/{bashrc,zshrc,zshenv}.before-nix-darwin
sudo -i nix run nix-darwin/master#darwin-rebuild -- switch --flake ~/.darwin#$HOSTNAMEDeterminate Nix note:
darwin-rebuildisn't installed globally. Run it viasudo -i nix run nix-darwin/master#darwin-rebuild.
nixmac uses separate models for evolution (config changes via tool use) and summarization (commit messages, UI labels).
| Variable | Default | Description |
|---|---|---|
EVOLVE_PROVIDER |
openai |
openai, openrouter, or ollama |
EVOLVE_MODEL |
anthropic/claude-sonnet-4 |
Model for config evolution |
SUMMARY_AI_PROVIDER |
openai |
Provider for summarization |
SUMMARY_MODEL |
openai/gpt-4o-mini |
Model for summaries |
OLLAMA_API_BASE |
http://localhost:11434 |
Ollama endpoint |
For fully local operation: EVOLVE_PROVIDER=ollama SUMMARY_AI_PROVIDER=ollama devenv up
Note: Models under ~70B parameters tend to struggle with the multi-tool evolution workflow.
# Basic evolution
nixmac evolve "install ripgrep and fd"
# With options
nixmac evolve "enable Touch ID for sudo" \
--config ~/.darwin \
--max-iterations 10 \
--evolve-provider ollama \
--evolve-model qwen3-coder:30b
# Dump results to JSON
nixmac evolve "add Homebrew casks for Firefox and 1Password" --out result.jsonThe apps/eval/ directory contains a reproducible benchmark harness for measuring evolution accuracy across models and providers, including support for vLLM and Ollama backends.
cd apps/eval
uv sync
python run_evals.py --provider ollama --model qwen3-coder:30b
python calc_stats.pyThe web app deploys via Alchemy:
cd apps/web && bun run deploy # deploy
cd apps/web && bun run destroy # tear downTagged commits trigger CI to produce signed .dmg builds:
npx release-it # interactive version bump + tag + GitHub releasenixmac uses PostgreSQL with Drizzle ORM for the web app and server:
bun run db:push # apply schema
bun run db:studio # open Drizzle Studio
bun run db:generate # generate migrations- darwin-rebuild logs:
~/Library/Logs/nixmac/ - App logs: stdout/stderr (or set
NIXMAC_LOGFILEfor file output) - Provider completion logs: set NIXMAC_RECORD_COMPLETIONS for full provider completions
# Merged tail of everything
tail -F ${NIXMAC_LOGFILE} ~/Library/Logs/nixmac/*MIT
