Based heavily on https://github.com/pimeys/nixos, without this as a guide this setup would not have been possible.
git clone https://github.com/claytonjgilmer/nixos-config /tmp/nixos
- Do partitioning/mounting steps (look at hosts to see which partitions need to be present & mounted)
mv /tmp/nixos /mnt/etc/nixos
nixos-generate-config --root /mnt --show-hardware-config
- Add output of the previous file to a new config in
hosts
- Add the new host to
flake.nix
nix-shell -p git nixFlakes
- Merge the hardware config with the dotfiles in
/mnt/etc/nixos
- Install NixOS:
nixos-install --root /mnt --flake /mnt/etc/nixos#XYZ
, whereXYZ
is the host you want to install. - Reboot!
- Change your
root
and$USER
passwords! chmod -R users /etc/nixos
ln -s /etc/nixos /home/claytonjgilmer/.config/nixpkgs