Personal Mac configuration managed declaratively with nix-darwin and home-manager for reproducible setup via a single command.

Stars

251

7-day growth

No data

Forks

133

Open issues

3

License

MIT-0

Last updated

2026-07-24

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

Demonstrates a clean, declarative approach to macOS configuration using Nix, with one-command setup and symlink-based config files that stay in sync.

Who it is for

  • macOS developers seeking reproducible environments
  • Nix and nix-darwin users
  • Users looking for a complete dotfiles template
  • People interested in Neovim and WezTerm configurations

Use cases

  • Reproducible fresh Mac setup from bare clone
  • Learning Nix-based dotfile management
  • Forking as a starting point for personal dotfiles
  • Declarative management of system settings, packages, and user-level configs

Strengths

  • Single-command bootstrap process (bootstrap.sh) installs Nix and applies config
  • Symlinks for config files (Neovim, WezTerm, etc.) prevent drift, no rebuild needed for edits
  • Covers both Apple Silicon and Intel Macs with a one-line change
  • Declarative management of macOS defaults, Homebrew casks, and Nix packages

Considerations

  • Not designed for multi-user or multi-machine environments
  • Homebrew cleanup ‘zap’ may remove packages not explicitly listed in configuration.nix
  • Forkers inherit the author’s AGENTS.md unless they edit or delete it

README quick start

dotfiles

Watch the walkthrough: https://youtu.be/5N-okeDdIuI

My personal Mac setup, managed with nix-darwin and home-manager. One repo, one command, and a fresh Mac ends up configured the same way every time.

Contributing / Using This Repo

These are my personal dotfiles, shared publicly so people can read them, learn from them, and fork them freely. Feature requests and pull requests are not accepted here, and PRs are auto-closed. If you find a bug, please open a GitHub Issue using the bug report template.

What you get

Running the switch builds:

  • System settings (dark mode, key repeat, dock, Finder, trackpad)
  • Homebrew apps (casks and CLI tools)
  • Nix user packages (ripgrep, fd, fzf, jq, lazygit, Neovim, Hack Nerd Font)
  • Shell (zsh, aliases, starship prompt)
  • Editor (Neovim config with the rose-pine moon theme)
  • Terminal (WezTerm config with the rose-pine moon theme)
  • Agent configs (Claude, Codex, opencode all share one AGENTS.md)

Prerequisites

  • Apple Silicon Mac, by default.
  • Intel Mac: change one line. In configuration.nix, set nixpkgs.hostPlatform = "x86_64-darwin"; (the comment right there tells you the same thing).

Fresh-machine setup

On a brand new Mac, from a bare clone of this repo:

git clone https://github.com/kunchenguid/dotfiles.git
cd dotfiles

Before you run it: review "Make it yours" below. Change the host label or CPU architecture if needed, and read the Homebrew cleanup warning. bootstrap.sh applies the config to your machine, so do this first.

./bootstrap.sh

bootstrap.sh does four things, in order:

  1. Installs Determinate Nix, if it isn't already installed.
  2. Symlinks this repo to ~/.dotfiles. This has to happen before the first build, because home.nix points at config files through ~/.dotfiles.
  3. Checks the user configured in flake.nix against your actual macOS username, and offers to fix it for you if they differ.
  4. Runs the first darwin-rebuild switch. It fetches the darwin-rebuild tool from the nix-darwin 26.05 release branch, then applies this repo's locked flake config.

After that, darwin-rebuild exists and you're on the normal workflow below.

Validate without applying

Once Nix is installed (bootstrap.sh step 1 handles that), you can check that the config builds without touching your system - handy when you have edited something:

Related repositories

Similar projects matched by category, topics, and programming language.

DigitalBrewStudios
DigitalBrewStudios GitHub avatar

darwin-modular-services

This repository adds support for NixOS-style modular services to nix-darwin, enabling declarative service management on macOS.

Nix
6