I store my dotfiles in the ~/.config
directory, and manage them with nix
on macOS.
Tested on macOS Sequoia 15, nix-installer v0.27 and nix v2.24.9
Run xcode-select --install
on a fresh macOS install.
Install nix
with the nix-installer
: https://github.com/DeterminateSystems/nix-installer
Clone this repo to ~/.config
⚠️ Look through codebase to change relevant user detail (pc name, username, email, etc.)!- Run
make
from the root directory to install all packages and setup the system
- Make changes (add apps, edit configs, etc.)
- (Optional) Run
nix flake update
- Run
make
from the root directory
alacritty
homebrew
with bundle and caskpnpm
withzshrc
overwrite
nodejs
withfnm
neovim
withastronvim
nix-darwin
,home-manager
python
withminiconda
rust
zellij
zsh
withstarship
- etc...
nix
documentation: https://nix.dev/manual/nix/- Search
nix
packages: https://search.nixos.org/packages nix-darwin
documentation: https://daiderd.com/nix-darwin/manual/index.htmlhome-manager
documentation: https://nix-community.github.io/home-manager/home-manager
option search: https://home-manager-options.extranix.com
You may have to run git add .
in repo root first for changes to be picked up.
Most times, I follow this order:
- see if
home-manager
programs supports it - install through
home-manager
packages - use
homebrew
(brew is useful for complex GUI apps like Firefox)
The nix-installer will write a /etc/nix/nix.conf
file first, and nix-darwin
might complain.
In that case, run sudo mv /etc/nix/nix.conf /etc/nix/nix.conf.before-nix-darwin
I use 1password to manage SSH and secrets, see https://developer.1password.com/docs/ssh/
Run sudo -i nix upgrade-nix
Run nix-collect-garbage -d