- Install macOS dependencies (if applicable)
xcode-select --install
- Install Nix using the Determinate Nix Installer
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- install
Then start a new shell session for nix
to become available in $PATH
.
- Clone this repository
git clone https://github.com/ryanmalonzo/dotfiles ~/dotfiles && \
cd ~/dotfiles
- Apply the configuration
For the first time setup:
nix run nix-darwin -- switch --flake .
For subsequent updates:
# Update and apply configuration
darwin-rebuild switch --flake .
# Delete old generations
nix-collect-garbage -d
# Update all flake inputs
nix flake update
# Update specific input
nix flake lock --update-input nixpkgs
nix flake lock --update-input home-manager