Each branch is the configuration for a specific host for the purposes of tracking host-specific configuration differences.
- configure lightdm
- LUKS encryption
- Boot installer live media
- Format disks
$ lsblk
$ sudo fdisk /dev/<disk>
# GPT partition
# Partition 1: +200M, Type 1 (EFI System)
# Partition 2: remaining space, Type default (Linux filesystem)
$ sudo mkfs.fat -F 32 /dev/<disk>1
$ sudo fatlabel /dev/<disk>1 NIXBOOT
$ sudo mkfs.ext4 /dev/<disk>2 -L NIXROOT
- Mount disks
$ sudo mount /dev/disk/by-label/NIXROOT /mnt
$ sudo mkdir /mnt/boot
$ sudo mount /dev/disk/by-label/NIXBOOT /mnt/boot
- Create swapfile
# 2GB swap
$ sudo dd if=/dev/zero of=/mnt/.swapfile bs=1024 count=2097152
$ sudo chmod 600 /mnt/.swapfile
$ sudo mkswap /mnt/.swapfile
- Generate configuration
$ sudo nixos-generate-config --root /mnt
$ cd /mnt/etc/nixos
- Import configuration from this repo
- Configure nix channels
$ sudo nix-channel --add <url> <channel>
- Build the system
$ sudo nixos-install
- Chroot into new system
$ sudo nixos-enter
# change password
# configure ssh
# configure dotfiles
- Reboot into new system