nixmac 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. What is nixmac? 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. Key Features Natural-language config evolution — an agentic loop with tool use (read, edit, search) that iterates until your system matches the prompt Multi-provider AI — OpenRouter (default), OpenAI-compatible endpoints, Ollama for fully local operation Tool-augmented agent — read_file, write_file, search_packages, search_docs, search_code tools 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 Architecture 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 The Evolution Loop 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 build validates the configuration Iterate → if the build fails, agent reads errors and tries again (up to N iterations) Apply → darwin-rebuild switch activates the new system generation Summarize → changeset and commit get AI-generated descriptions Getting Started Prerequisites 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) Install from Release 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. Build from Source git clone https://github.com/darkmatter/nixmac.git cd nixmac devenv shell bun install cd apps/native && bun run tauri build --bundles app Build Debug with Bundle cd apps/native bun run tauri build --debug ../../target/debug/nixmac Development 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 Profiling (Rust-side) 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. Setting Up nix-darwin 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 Nixmac Template Placeholders 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-rebuild isn't installed globally. Run it via sudo -i nix run nix-darwin/master#darwin-rebuild. AI Configuration 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. CLI # 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 Eval Suite 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 Deployment The web app deploys via Alchemy: cd apps/web && bun run deploy # deploy cd apps/web && bun run destroy # tear down Releases Tagged commits trigger CI to produce signed .dmg builds: npx release-it # interactive version bump + tag + GitHub release Database 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 Logs darwin-rebuild logs: ~/Library/Logs/nixmac/ App logs: stdout/stderr (or set NIXMAC_LOGFILE for file output) Provider completion logs: set NIXMAC_RECORD_COMPLETIONS for full provider completions # Merged tail of everything tail -F ${NIXMAC_LOGFILE} ~/Library/Logs/nixmac/*
Get the weekly radar
One short email with the freshest products, every week.