Nix flake-based system configuration managing three machines:
| Host | Type | Description |
|---|---|---|
| carbon | macOS (aarch64-darwin) | Personal Mac |
| neon | macOS (aarch64-darwin) | Work Mac |
| argon | NixOS (x86_64-linux) | Desktop |
-
Install Xcode from the Mac App Store
-
Install Xcode Command Line Tools:
xcode-select --install
-
Install Nix using the Determinate installer
Homebrew, 1Password, and all other dependencies are installed automatically during the first build.
- Boot the NixOS installer and complete the base installation
- Nix is already available as part of the OS
-
Clone this repo via HTTPS (SSH isn't available yet on a fresh machine):
git clone https://github.com/ThePaulMcBride/dotfiles.git ~/dotfiles -
Run the initial build:
nix run nix-darwin -- switch --flake ~/dotfiles#<hostname>
For example,
~/dotfiles#carbonfor the personal Mac or~/dotfiles#neonfor the work Mac. -
Open 1Password, sign in, and enable the SSH agent (Settings > Developer > SSH Agent). The git config rewrites all GitHub HTTPS URLs to SSH and enables commit signing via
op-ssh-sign, so 1Password must be configured before the next step. -
Run the build again to ensure everything completes cleanly with SSH available:
sudo darwin-rebuild switch --flake ~/dotfiles#<hostname>
-
Switch the repo remote to SSH:
git -C ~/dotfiles remote set-url origin git@github.com:ThePaulMcBride/dotfiles.git
sudo nixos-rebuild switch --flake ~/dotfiles#argonAfter the initial setup, shell aliases are available:
darwin-switch # Rebuild macOS config (auto-detects hostname)
darwin-switch-home # Rebuild with carbon config
darwin-switch-work # Rebuild with neon config
nix-switch # Rebuild NixOS config
nix-update # Update flake inputsdotfiles/ # Application configs (git, nvim, zsh, ghostty, etc.)
hosts/ # Per-machine host definitions
modules/ # Reusable Nix modules
scripts/ # Shell scripts installed via Home Manager
flake.nix # Flake entry point