nix-darwin applies a NixOS-style declarative configuration model to macOS. Users describe system settings in Nix modules and apply changes with darwin-rebuild, including flake- or channel-based workflows.
Overview
nix-darwin brings modular Nix configuration to Apple silicon Macs, analogous to /etc/nixos/configuration.nix on NixOS. It builds on Nixpkgs and lets you manage packages, services, and launchd settings from versioned config.
Beginners are guided toward Nix flakes: you generate or migrate a flake.nix, run darwin-rebuild switch, and iterate on configuration.nix. Channel-based installation remains documented for users who prefer classic Nix channels.
The project manages the Nix installation by default but can be pointed at Lix through nix.package. Reference documentation is available online, via darwin-help locally, and as a man page for configuration.nix.
Uninstallers are provided both as a flake run target and as a local darwin-uninstaller command. Recent releases focus on Apple silicon; Intel support continues on a dedicated branch with matching nixpkgs pins.
Key features
- Declarative macOS system modules
- darwin-rebuild apply workflow
- Flake and channel install paths
- Integration with Nixpkgs
- Local reference documentation
- Configurable Nix or Lix package
- Uninstall tooling included
Use cases
- Reproducible Mac developer machine setup
- Version-controlled macOS dotfiles and services
- Migrating from manual Homebrew-only workflows