Step 1 - Partitioning
I'm going to do the most basic setup when it comes to file systems, just a
ext4 without encryption. If you want to
have another file system or use LUKS or something it should be trivial to
just format the drive differently and mount it.
# Defining a helper variable to make the # following commands shorter. DISK=/dev/disk/by-id/ata-VENDOR-ID-OF-THE-DRIVE # Create partition table parted $DISK -- mklabel msdos # Create a /boot as $DISK-part1 parted $DISK -- mkpart primary ext4 1M 512M parted $DISK -- set 1 boot on # Create a /nix as $DISK-part2 parted $DISK -- mkpart primary ext4 512MiB 100%