Installation
https://nixos.org/manual/nixos/stable/#sec-installation-manual
This assumes that you are running these commands from a NixOS system yourself. If you do not have the dots directory, get it via git clone https://github.com/orangci/dots. Replace HOSTNAME and USERNAME with your intended hostname and username respectively. For documentation on installing for homelab/server usage, see the relevant documentation.
This installation does not create a swap partition. Edit/add commands as you see fit in order to create one, if necessary.
wipefs -a /dev/sdanix-shell -p parted git btrfs-progsparted /dev/sda -- mklabel gptparted /dev/sda -- mkpart root btrfs 512MBparted /dev/sda -- mkpart ESP fat32 1MB 512MBparted /dev/sda -- set 2 esp onmkfs.btrfs -L HOSTNAME /dev/sda1mkfs.fat -F 32 -n boot /dev/sda2mount /dev/disk/by-label/HOSTNAME /mntmkdir -p /mnt/bootmount -o umask=077 /dev/disk/by-label/boot /mnt/bootnixos-generate-config --root /mnt --show-hardware-config > dots/hosts/HOSTNAME/hardware.nix- Commit and push (or, if you're not me,
git add .) nixos-install --flake .#HOSTNAMEnixos-enter --root /mntpasswd USERNAMEcat /etc/ssh/ssh_host_ed25519_key.pub | ssh-to-age- Setup secrets configuration with the above host key.