This all works (theoretically), it is preferred to install through the gnome graphical installer https://nixos.org/manual/nixos/stable/#sec-installation
- https://nixos.org/download/ download the minimal ISO and boot into it
sudo -i
lsblk
to view drivesfdisk /dev/sda
if sda is the drive you want to install ong
- new partition
n
with size of+550M
- new partition
n
with all the remaining disk size w
mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
mkdir -p /dev/sda1 /mnt/boot
cd /mnt
nixos-generate-config --root /mnt
vim /mnt/etc/nixos/configuration.nix
and if you want to use grub as the default bootloader, setboot.loader.grub.device
to/dev/sda
andboot.loader.grub.efiSupport
totrue
.nixos-install
reboot
- After reboot,
ln -s /etc/nixos /home/yoshixi/nixos