From 624861cab980b1ac97b731619268a73b9021f8df Mon Sep 17 00:00:00 2001 From: Luke Else Date: Thu, 20 Mar 2025 17:02:48 +0000 Subject: [PATCH] Updated script to properly allow efi boot --- install.sh | 19 ++++++++++++++----- modules/common.nix | 1 + 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 71b0796..4c43e2e 100644 --- a/install.sh +++ b/install.sh @@ -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 diff --git a/modules/common.nix b/modules/common.nix index b598fc2..6dce439 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -5,6 +5,7 @@ boot.loader.grub = { enable = true; device = "nodev"; + efiSupport = true; }; fileSystems."/" = {