NixOS configuration
- Grab the latest build of NixOS
- Boot into the installer
- Do your partitions and mount your root to
/mnt
- Install build dependencies:
nix-shell -p git nixFlakes nixUnstable
- Copy dotfiles:
git clone /~https://github.com/AntonHakansson/dotfiles /mnt/etc/nixos
- Install NixOS:
nix build /mnt/etc/nixos#nixosConfigurations.<HOSTNAME>.config.system.build.toplevel --experimental-features "flakes nix-command" --store "/mnt" --impure nixos-install --root /mnt --system ./result
- Reboot!
- Follow Rebuild system instructions
Make sure the dotfiles are located in ~/.config/dotfiles
then from the dotfiles root directory run:
nixos-rebuild switch --flake .#<HOSTNAME>