Updated script to properly allow efi boot

This commit is contained in:
Luke Else 2025-03-20 17:02:48 +00:00
parent 418e989946
commit 624861cab9
2 changed files with 15 additions and 5 deletions

View File

@ -1,14 +1,23 @@
# Assuming /dev/sda is the target disk
parted /dev/sda -- mklabel gpt
parted /dev/sda -- mkpart primary ext4 1MiB 100%
mkfs.ext4 /dev/sda1
mount /dev/sda1 /mnt
cryptsetup luksFormat /dev/sda1
cryptsetup open /dev/sda1 root
parted /dev/sda -- mkpart ESP fat32 1MiB 513MiB
parted /dev/sda -- set 1 boot on
parted /dev/sda -- mkpart primary ext4 513MiB 100%
mkfs.fat -F32 -n BOOT /dev/sda1
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt
cryptsetup luksFormat /dev/sda2
cryptsetup open /dev/sda2 root
mkfs.ext4 /dev/mapper/root
mount /dev/mapper/root /mnt
mkdir -p /mnt/boot
mount /dev/sda1 /mnt/boot
mkdir -p /mnt/etc/nixos
git clone https://git.luke-else.co.uk/luke-else/nixos-config.git /mnt/etc/nixos

View File

@ -5,6 +5,7 @@
boot.loader.grub = {
enable = true;
device = "nodev";
efiSupport = true;
};
fileSystems."/" = {