This repository contains the nix-darwin + home-manager setup for my macOS machines.
main: everyday machineserver: old MacBook used as a mini-k8s serversyntho: personal/workstation machine
- Install Nix (Determinate Nix or official Nix installer).
- Clone this repository to
~/.config/machines. - Run the first switch using the target machine name.
- Bootstrap secrets (see
docs/sops.md). - Run switch again.
Use <machine> as one of main, server, or syntho or leave it blank and the OS machine name will be used:
sudo nix --extra-experimental-features 'nix-command flakes' \
run nix-darwin/master#darwin-rebuild -- \
switch --flake ~/.config/machinesAfter darwin-rebuild is available, you can use:
sudo darwin-rebuild switch --flake ~/.config/machines-
Explicit command (recommended):
sudo darwin-rebuild switch --flake ~/.config/machines -
Alias
applyexists in zsh config.
Follow docs/sops.md for first bootstrapping and ongoing secret management.
The file common/.terminal.terminal is automatically imported during Home Manager activation.
- profile name:
.JoeTerminal - set as both startup and default Terminal profile
- the first activation may open Terminal.app briefly to register the profile
If you see this on a host, check whether that machine enables
system.defaults.universalaccess. On syntho, this is intentionally disabled via
config/syntho/system.nix because this domain can be blocked by macOS permissions.
Use the explicit machine command instead of apply:
sudo darwin-rebuild switch --flake ~/.config/machinesCreate a project from a template:
nix flake init -t ~/.config/machines#pythonStart a shell from this flake:
nix develop ~/.config/machines#node -c $SHELL