nix-darwin

Configure macOS system defaults and services declaratively with Nix.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/kaiiiiiiiii/nix-packages --skill nix-darwin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix-darwin
Source: https://github.com/kaiiiiiiiii/nix-packages/tree/main/.github/skills/nix-darwin
Command: npx skills add https://github.com/kaiiiiiiiii/nix-packages --skill nix-darwin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

nix-darwin brings NixOS-style declarative configuration to macOS, enabling consistent system defaults, services (launchd), and integrations across machines.

Core Features & Use Cases

  • Declarative macOS configuration using darwinSystem instead of nixosSystem
  • Launchd-based service management and automated startup tasks
  • Homebrew integration for GUI applications and toolchains
  • Reproducible macOS environments across machines via Flakes and modules

Quick Start

Create a flake that defines darwinConfigurations and apply it with darwin-rebuild switch

Frequently Asked Questions about nix-darwin

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage macOS system defaults and services declaratively?

To manage macOS system defaults and services declaratively, use nix-darwin to define system configuration via Nix modules. It handles launchd-based service management and ensures repeatable system defaults across machines.

Can I use Nix Flakes to configure multiple macOS machines reproducibly?

Yes, you can configure multiple macOS machines reproducibly by defining darwinConfigurations within a Nix Flake. Applying the Flake with darwin-rebuild switch ensures consistent environments across developer laptops.

Does nix-darwin work with home-manager and Homebrew?

Yes, nix-darwin integrates with home-manager for user-level configuration and Homebrew for installing GUI applications and toolchains. This allows combined declarative management of system services and graphical apps.

What is the best way to automate launchd service management on macOS using Nix?

The best way to automate launchd service management with Nix is using nix-darwin. It replaces nixosSystem with darwinSystem to define and manage automated startup tasks and system services declaratively.

Do I need nixpkgs and home-manager to use declarative macOS configuration?

Yes, you need nixpkgs, nix-darwin, home-manager, and darwin-specific modules to express system state declaratively. These dependencies are required to configure macOS defaults and integrations effectively.