My personal nix darwin config
README.md

nix-darwin configuration #

This flake configures Christophers-MacBook-Air with nix-darwin and Home Manager. It is set up for Apple Silicon, the chris user, and Determinate Nix.

First activation #

From this directory:

sudo nix run github:nix-darwin/nix-darwin/master#darwin-rebuild -- \
  switch --flake .#Christophers-MacBook-Air

Open a new terminal after the first activation. Future changes can be applied with:

rebuild

Routine maintenance #

Check and format the configuration:

nix flake check
nix fmt

Update all pinned inputs, review flake.lock, and rebuild:

nix flake update
rebuild

System settings and global packages live in hosts/Christophers-MacBook-Air/default.nix. User packages, shell settings, and dotfiles live in home/chris.nix.

GUI applications #

Add GUI packages to environment.systemPackages to copy their .app bundles to /Applications/Nix Apps:

environment.systemPackages = with pkgs; [
  firefox
];

GUI packages in home.packages are copied to ~/Applications/Home Manager Apps. Both locations are visible to Finder and Spotlight after rebuilding. A package must provide an Applications/*.app bundle; command-line-only packages do not appear as macOS applications.