curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install --determinate
xcode-select --install
- Use git in a temporary nix-shell
nix-shell -p git
Clone the repo.
mkdir ~/nix-config
cd ~/nix-config
git clone https://github.com/aleksanderbl29/nix-config .
Exit the nix-shell after cloning the repo.
You don't have to specify the hostname as long as the machine hostname is one of the outputs in flake.nix
.
MacOS
nix --extra-experimental-features "nix-command flakes" run nix-darwin -- switch --flake ~/nix-config/
NixOS
sudo nixos-rebuild switch --flake ~/nix-config#
All subsequent rebuilds can be done with the same command on all systems.
nixswitch