Home manager and nix-darwin that understands plain English
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.
read_file, write_file, search_packages, search_docs, search_code tools give the model deep context about nix-darwin options and nixpkgsnixmac evolve "..." from the terminalnixmac/
├── 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
darwin-rebuild build validates the configurationdarwin-rebuild switch activates the new system generationnix profile add github:cachix/devenv/latest~/.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 app
cd apps/native bun run tauri build --debug ../../target/debug/nixmac
devenv 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 app
You should have Xcode installed.
cd apps/native bunx tauri build -- --profile profiling
and run the app from /target via:
cd ../.. open -a "Instruments" ./target/profiling/nixmac
Or start ../../target/profiling/nixmac manually to get past the startup overhead, start Instruments, and attach to the process.
If you don't already have a nix-darwin configuration:
mkdir -p ~/.darwin && cd ~/.darwin git init
Copy 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#$HOSTNAME
When you import a nix repository from a zip file, nixmac will perform substitution on the following placeholder strings:
| Placeholder | Value |
|---|---|
HOSTNAME_PLACEHOLDER |
Hostname of the Mac you're running on |
PLATFORM_PLACEHOLDER |
Platform architecture of the Mac you're running on |
USERNAME_PLACEHOLDER |
Current username e.g. $USER |
Determinate 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 |
openrouter |
openrouter, openai, ollama, or openai_compatible |
EVOLVE_MODEL |
anthropic/claude-sonnet-4 |
Model for config evolution |
SUMMARY_AI_PROVIDER |
openrouter |
Provider for summarization |
SUMMARY_MODEL |
openai/gpt-4o-mini |
Model for summaries |
OLLAMA_API_BASE |
http://localhost:11434 |
Ollama endpoint |
VLLM_API_BASE |
unset | OpenAI-compatible endpoint, for example http://localhost:8000/v1 |
VLLM_API_KEY |
unset | Optional OpenAI-compatible API key |
For fully local operation: EVOLVE_PROVIDER=ollama SUMMARY_AI_PROVIDER=ollama devenv up
Evolution calls request up to 32,768 output tokens by default. For self-hosted OpenAI-compatible servers,
open Settings → AI Models → Evolution Limits and set Max output tokens low enough
to leave room for the prompt inside your model's context window. For example, a model
with a 65,536-token context window should use less than 65,536 output tokens; 32,768 is
a safe starting point for typical prompts. The same value can be set for CLI runs with
nixmac evolve --max-output-tokens <tokens>.
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-token-budget 50000 \ --max-output-tokens 32768 \ --evolve-provider ollama \ --evolve-model qwen3-coder:30b # Dump results to JSON nixmac evolve "add Homebrew casks for Firefox and 1Password" --out result.json
The apps/eval/ directory contains a reproducible benchmark harness for measuring evolution accuracy across models and providers, including support for OpenAI-compatible and Ollama backends.
cd apps/eval uv sync python run_evals.py --provider ollama --model qwen3-coder:30b python calc_stats.py
The web app deploys via Alchemy:
cd apps/web && bun run deploy # deploy cd apps/web && bun run destroy # tear down
Tagged commits trigger CI to produce signed .dmg builds:
npx release-it # interactive version bump + tag + GitHub release
nixmac 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
~/Library/Logs/nixmac/NIXMAC_LOGFILE for file output)# Merged tail of everything
tail -F ${NIXMAC_LOGFILE} ~/Library/Logs/nixmac/*