Manage with Nix, home-manager, nix-darwin.
| Device | Hostname | OS | System |
|---|---|---|---|
| M3 MacBook Air 13" | marisa | macOS 15.2 (Sequoia) | aarch64-darwin |
Install Nix via DeterminateSystems/nix-installer.
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | \
sh -s -- installthen, run sudo nix run nix-darwin -- switch --flake .#{hostname}.
home-manager runs as a nix-darwin module, so this also applies the user configuration.
Day-to-day operations go through nh.
programs.nh.flake points NH_FLAKE at this repository, so these work from any directory.
nh shows a diff of what changes before it activates, and asks for sudo only for activation.
Applies both nix-darwin and home-manager (zsh abbreviation: sw).
nh darwin switch -H marisa --ask --diff alwaysUpdates all flake inputs, then switches (zsh abbreviation: up).
nh darwin switch -H marisa -u --ask --diff alwaysprograms.nh.clean runs nh clean all periodically. To run it by hand:
nh clean all --keep-since 14d --keep 3