Updated the install script to remove disk encryption
Some checks failed
NixOS Configuration Check / nixos-check (push) Failing after 22s

This commit is contained in:
Luke Else 2025-04-24 20:02:39 +01:00
parent e9416202dd
commit 015518753e

View File

@ -5,31 +5,22 @@ DISK="/dev/sda"
parted $DISK -- mklabel gpt
# Create the root partition
parted $DISK -- mkpart root ext4 512MiB 100%
parted $DISK -- mkpart primary ext4 512MiB 100%
parted $DISK -- mkpart ESP fat32 1MB 512MiB
# Create the EFI partition
parted $DISK -- mkpart ESP fat32 1MiB 512MiB
parted $DISK -- set 2 esp on
# DO NOT FORMAT the root partition before encryption!
# cryptsetup will fail if the partition is already formatted
# Format the root partition
mkfs.ext4 ${DISK}1
# Encrypt the root partition
cryptsetup luksFormat ${DISK}1
cryptsetup open ${DISK}1 root
# Now format the encrypted partition
mkfs.ext4 /dev/mapper/root
# Mount the partitions
mount /dev/mapper/root /mnt
# Format
# Format the EFI partition
mkfs.fat -F 32 -n BOOT ${DISK}2
# Mount the partitions
mount ${DISK}1 /mnt
mkdir -p /mnt/boot
mount -o umask=077 /dev/sda2 /mnt/boot
mount ${DISK}2 /mnt/boot
# Clone the configuration repository
mkdir -p /mnt/etc/nixos