Skip to content
Back to skills

Nix Darwin

ASecurity

Configure this macOS dotfiles repository's Nix modules, hosts, and packages, or diagnose darwin-rebuild failures.

  • 63 stars
  • 0 votes
  • 2 copies
  • 5 views
  • Added September 9, 2026
toolsgo

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 22, 2026

npx -y skills add ahonn/dotfiles --skill nix-darwin --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Nix Darwin?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Nix Darwin
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ahonn-nix-darwin/badge)](https://www.skillsdirectory.com/skills/ahonn-nix-darwin)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: nix-darwin
description: Configure this macOS dotfiles repository's Nix modules, hosts, and packages, or diagnose darwin-rebuild failures.
user-invocable: false
---

# nix-darwin Configuration

Two hosts (`workstation`, `homelab`) are built by `mkDarwinConfig` in `flake.nix` from three layers: darwin modules (system) → home-manager (user) → nix-homebrew (GUI apps and taps). Both hosts share nixpkgs-unstable. Read the host's `home.nix` and `homebrew.nix` for what is currently enabled; do not rely on remembered program lists.

## Conventions

New programs follow [templates/program-module.md](templates/program-module.md): an `options.my.<program>.enable` module under `modules/home-manager/programs/`, imported by the host's `home.nix` and enabled there. Shared programs are imported by `modules/home-manager/base.nix` instead.

| Config delivery | When to use | Example |
|-----------------|-------------|---------|
| `mkOutOfStoreSymlink` | Config edited often, applied without rebuild | neovim, aerospace |
| `builtins.readFile` | Config copied into the Nix store | zed-editor |
| Inline Nix `settings` | Small, Nix-native config | ghostty, starship |

Naming: `kebab-case.nix` files and host names, `my.<program>.enable` options, `symlink/<name>.symlink` dotfiles, and conventional commit scopes such as `feat(neovim):` or `fix(darwin):`.

## Read by problem

| Problem or decision | Reference |
|---------------------|-----------|
| Where a module is wired in, or why the layout is shaped this way | [architecture.md](references/architecture.md) |
| Build, rollback, generations, input updates, garbage collection | [commands.md](references/commands.md) |
| `darwin-rebuild` or evaluation failure, Homebrew DSL or tap errors, macOS compatibility | [gotchas.md](references/gotchas.md) |
| The user asks how to restructure or improve the configuration | [community-patterns.md](references/community-patterns.md) — check each pattern's status in this repo first |

## Complete the change

Evaluate each affected host with `nix eval --raw .#darwinConfigurations.<host>.system.drvPath`. `nix flake check` only checks formatting and passes even when a host fails to evaluate; `nix fmt` fixes formatting. Changes under `modules/`, `hosts/`, or `flake.nix` take effect only after `darwin-rebuild switch`; follow the project CLAUDE.md for when that needs confirmation.

Files in this skill

  • SKILL.md4.2 KB
  • references/architecture.md3 KB
  • references/commands.md2 KB
  • references/community-patterns.md5 KB
  • references/gotchas.md5.6 KB
  • templates/program-module.md1000 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in tools →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.