Nix configurations for my MacOS and NixOS hosts.
- Install Nix package manager: https://nixos.org/download.html#nix-install-macos
- Clone or download the flake source from GitHub.
- Run
./bootstrap.sh
to build and apply the system configuration.
The bootstrap command builds a derivation and then activates it with nix-darwin. The bootstrap command likely won't succeed on the first run, but if it fails, there should be instructions for manual remediation. Once those are performed, you can re-run ./bootstrap.sh
(there might be a few cycles of this).
Rebuild and apply: nixswitch
This is an alias for building and activating the system configuration flake, which is effectively the same as:
darwin-rebuild switch --flake .#
To get latest packages, go into the flake source directory and run:
nix flake update
In order to apply the update, use nixswitch
after.
To update inputs and apply the change run nixup
.
To update a specific input (using envim
as an example): nix flake lock --update-input envim