-
Install Nix via multi-user installation:
sh <(curl -L https://nixos.org/nix/install) --daemon
-
Enter Nix shell (for the first time only):
nix-shell
-
Then, build the configuration (for the first time only):
cd ~/.dotfiles nix build '.#darwinConfigurations.<hostname>.system'
-
Then, switch to the new configuration:
./result/sw/bin/darwin-rebuild switch --flake '.#<hostname>'
-
Enter Nix shell (for the first time only):
nix-shell
-
Then, switch to the new configuration:
nixos-rebuild switch --flake '.#<hostname>'