Declarative macOS setup for a single Apple Silicon Mac, built with nix-darwin, home-manager and nix-homebrew.
The whole configuration lives in flake.nix. It manages:
- system packages, fonts and macOS defaults (dock, Finder, Touch ID for sudo)
- Homebrew taps, formulae and casks (GUI apps)
- the
dcunhauser environment: zsh with zimfw, git, fzf, mise, ghostty
-
Install Nix with flakes enabled (for example the Determinate installer).
-
Install Xcode Command Line Tools:
xcode-select --install. -
Clone this repo to
~/.config/nix:git clone git@github.com:danielsoro/dotfiles.git ~/.config/nix -
Apply it for the first time:
sudo nix run nix-darwin -- switch --flake ~/.config/nix#dcunhaHomebrew is installed and migrated automatically by nix-homebrew on this run.
After the first switch, darwin-rebuild is on the PATH and zsh has a switch alias:
switch # sudo darwin-rebuild switch --flake ~/.config/nix#dcunha
nix flake update # bump flake.lock
nix flake check # evaluate without applying
nixpkgs-fmt flake.nix # format
Files under dotfiles/ are linked into the home directory by home-manager.
Commits follow Conventional Commits and are managed with
commitizen (.cz.toml).
Changes go through pull requests.