Skip to content

Instantly share code, notes, and snippets.

@guillaumebreton
Created May 16, 2020 18:05
Show Gist options
  • Save guillaumebreton/d27703b8d6bbb4885486d4b53c6fa8f8 to your computer and use it in GitHub Desktop.
Save guillaumebreton/d27703b8d6bbb4885486d4b53c6fa8f8 to your computer and use it in GitHub Desktop.
sudo parted /dev/sdb -- mklabel gpt
sudo parted /dev/sdb -- mkpart primary 512MiB -8GiB
sudo parted /dev/sdb -- mkpart primary linux-swap -8GiB 100%
sudo parted /dev/sdb -- mkpart ESP fat32 1MiB 512MiB
sudo parted /dev/sdb -- set 3 boot on
mkfs.ext4 -L nixos /dev/sdb1
mkswap -L swap /dev/sdb2
swapon /dev/sdb2
mkfs.fat -F 32 -n boot /dev/sdb3
mount /dev/disk/by-label/nixos /mnt
mkdir -p /mnt/boot
mount /dev/disk/by-label/boot /mnt/boot
nixos-generate-config --root /mnt
nano /mnt/etc/nixos/configuration.nix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment