- Download the lates NixOS image from here
- Insert USB drive
- Write the image to the USB drive:
# dd if=path-to-image of=/dev/sdb # specify whole device, not partition
- Disable Secure Boot in BIOS
- Change Graphics to Discrete Graphics if using Hybrid Graphics (Config -> Display -> Graphics Device)
- Boot from the USB
- Insert ethernet cable
For easy setup, the following command does install in one script.
$ sudo su root # curl -o start https://raw.githubusercontent.com/usami/nixos-setup/master/start # chmod +x start # ./start
- Create partitions ref
$ sudo su root # curl -o partition https://raw.githubusercontent.com/usami/nixos-setup/master/partition # chmod +x partition # ./partition /dev/nvme0n1
- Insert yubikey
- Setup crypted volume
# curl -o setup https://raw.githubusercontent.com/usami/nixos-setup/master/setup # chmod +x setup # ./setup /dev/nvme0n1p1 /dev/nvme0n1p2 /dev/nvme0n1p3
- Get minimal setup configuration
# cd /mnt/etc/nixos # rm configuration.nix # curl -o configuration.nix https://raw.githubusercontent.com/usami/nixos-setup/master/configuration.nix
- Install and reboot
# nixos-install # reboot
For easy setup,
finish-setup
command does all the following steps.
- Login as user
yu
(initial password:asdf
) - Add new device
$ keybase login
- Clone nixos config git
$ git clone keybase://private/yusmi/nixos
- Clone dotconfig git
$ git clone keybase://private/yusmi/dotconfig
- Create symbolic links
$ cp /etc/nixos/hardware-configuration.nix /home/yu/nixos/ $ sudo rm -rf /etc/nixos $ sudo ln -s /home/yu/nixos /etc/nixos $ rm -rf .config $ ln -s dotconfig .config
- Rebuild
$ sudo nixos-rebuild switch