A flake-first configuration for one Apple Silicon Mac, built with flake-parts, nix-darwin, and Home Manager on nixpkgs unstable.
The repository treats macOS, Homebrew, command-line tools, and dotfiles as one declarative system. Language toolchains stay in project-specific development shells instead of the global workstation profile.
- Determinate Nix through its nix-darwin module, with the nix-community binary cache enabled.
- Homebrew itself through nix-homebrew and Homebrew packages through nix-darwin.
- Fish, Git, GnuPG, Helix, direnv, nh, and other user tools through Home Manager.
- A selective Catppuccin Macchiato theme for supported terminal applications.
- Formatting, linting, evaluation, and system builds through the flake development shell and GitHub Actions.
Homebrew is limited to the container and mole formulae plus these casks:
ChatGPT, Ghostty, IINA, Keka, OnyX, SFM, and Visual Studio Code. The Apple
container service starts automatically.
- An Apple Silicon Mac running macOS 26.
- Administrator access for the initial system activation.
- Determinate Nix.
Clone the repository into any directory:
git clone https://github.com/romeoahmed/nix-config.git
cd nix-configBefore applying it to another account, review:
hosts/workstation.nixfor the macOS account name.modules/home/workstation.nixfor the Git identity, OpenPGP signing fingerprint, and GPG agent SSH keygrip.modules/darwin/homebrew.nixfor the applications that will be installed.
Remove an existing unmanaged Homebrew installation before the first activation. Automatic migration is deliberately disabled.
Caution
Homebrew activation uses cleanup = "zap". Undeclared formulae, casks, and
files associated with removed casks may be deleted.
Install nix-darwin and activate the workstation configuration from the
repository root:
sudo nix run nix-darwin/master#darwin-rebuild -- \
switch --flake .#workstationApply later changes with nh:
nh darwin switch . -H workstationEnter the repository development shell to access its maintenance tools:
nix develop
just --list| Command | Purpose |
|---|---|
just fmt |
Format Nix files |
just hooks |
Run all formatting and static-analysis hooks |
just check |
Run every flake check |
just eval |
Evaluate the Darwin system derivation |
just build |
Build the system without activating it |
just switch |
Build and activate the system with nh |
| Path | Purpose |
|---|---|
flake.nix |
Inputs, supported platform, and output composition |
hosts/workstation.nix |
Account binding and host assembly |
modules/darwin/ |
Machine, Nix, and Homebrew policy |
modules/home/ |
User packages, programs, and dotfiles |
modules/flake/ |
Formatter, checks, and development shell |
.github/ |
Continuous integration and dependency updates |
MIT © 2026 Romeo Ahmed