First change the settings in globals.nix.
Install Determinate Nix from determinate.systems.1
For initial setup use the following:
# using flake from github
sudo nix run nix-darwin/nix-darwin-25.11#darwin-rebuild -- switch --flake "git+ssh://git@github.com/elkozmon/nix-config?ref=main#macbook"
# using local flake
sudo nix run nix-darwin/nix-darwin-25.11#darwin-rebuild -- switch --flake .#macbookI recommend rebooting the machine after that.2
Then once nix-darwin is installed you may use the darwin-rebuild command:
# using flake from github
sudo darwin-rebuild switch --flake "git+ssh://git@github.com/elkozmon/nix-config?ref=main#macbook"
# using local flake
sudo darwin-rebuild switch --flake .#macbookTo generate SSH keys run:
nix run .#create-keysFootnotes
-
This flake configures nix-darwin for Determinate Nix. If you choose another distro, update the nix-darwin config. ↩
-
Some settings take effect only after a reboot. ↩