From 06779a2bf06e905d19079d630c34d6199ffac4fa Mon Sep 17 00:00:00 2001 From: rogueking Date: Sun, 21 Jun 2026 21:40:51 -0400 Subject: [PATCH] replaced grub with systemd --- hosts/acheron/iso.nix | 8 +++++++- hosts/buildbox/configuration.nix | 10 ++++------ hosts/buildbox/disko-config.nix | 22 ++++++++++++---------- hosts/ender-ml/configuration.nix | 6 ++++-- hosts/ender-ml/disko-config.nix | 15 ++++++++++++++- 5 files changed, 41 insertions(+), 20 deletions(-) diff --git a/hosts/acheron/iso.nix b/hosts/acheron/iso.nix index 6435c23..a00ec96 100644 --- a/hosts/acheron/iso.nix +++ b/hosts/acheron/iso.nix @@ -1,7 +1,13 @@ # ── acheron rescue / installer ISO ───────────────────────────── # ISO for VM / server deployment. Supports both BIOS (SeaBIOS) and # UEFI boot for maximum Proxmox compatibility. -{ config, pkgs, pkgs-unstable, lib, ... }: { +{ + config, + pkgs, + pkgs-unstable, + lib, + ... +}: { imports = [ ../iso/default.nix ]; diff --git a/hosts/buildbox/configuration.nix b/hosts/buildbox/configuration.nix index a0d61a9..de661f8 100644 --- a/hosts/buildbox/configuration.nix +++ b/hosts/buildbox/configuration.nix @@ -17,12 +17,10 @@ inputs.home-manager.nixosModules.default ]; - # Bootloader. disko derives boot.loader.grub.devices automatically - # from the EF02 (BIOS Boot) partition in ./disko-config.nix, so we - # only enable GRUB here — do NOT set grub.devices, or it will merge - # with disko's value and trigger the "duplicated devices in - # mirroredBoots" assertion. - boot.loader.grub.enable = lib.mkDefault true; + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.removableDeviceAssistant = true; nix.settings.experimental-features = ["nix-command" "flakes"]; diff --git a/hosts/buildbox/disko-config.nix b/hosts/buildbox/disko-config.nix index 91d1bf8..3ea1bd7 100644 --- a/hosts/buildbox/disko-config.nix +++ b/hosts/buildbox/disko-config.nix @@ -13,16 +13,18 @@ content = { type = "gpt"; partitions = { - # GRUB's core.img lives here on GPT/BIOS systems (GPT leaves no - # gap after the MBR, so grub-install needs an EF02 partition). - # No `content` block — this partition holds raw GRUB boot code, - # not a filesystem. disko also derives boot.loader.grub.devices - # from this partition automatically. - # See: https://github.com/nix-community/disko/blob/master/example/gpt-bios-compat.nix - boot = { - size = "1M"; - type = "EF02"; - attributes = [0]; + # Modern EFI System Partition (ESP) + ESP = { + priority = 1; + name = "ESP"; + size = "1G"; # 1GB gives plenty of space for multiple NixOS kernels/generations + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = ["umask=0077"]; + }; }; root = { size = "100%"; diff --git a/hosts/ender-ml/configuration.nix b/hosts/ender-ml/configuration.nix index 666acaa..218e41f 100644 --- a/hosts/ender-ml/configuration.nix +++ b/hosts/ender-ml/configuration.nix @@ -20,8 +20,10 @@ boot.kernelPackages = pkgs-unstable.linuxKernel.packages.linux_zen; # Bootloader. - boot.loader.grub.enable = lib.mkDefault true; - boot.loader.grub.devices = ["nodev"]; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.loader.systemd-boot.removableDeviceAssistant = true; + nix.settings.experimental-features = ["nix-command" "flakes"]; diff --git a/hosts/ender-ml/disko-config.nix b/hosts/ender-ml/disko-config.nix index 9efaac5..3ea1bd7 100644 --- a/hosts/ender-ml/disko-config.nix +++ b/hosts/ender-ml/disko-config.nix @@ -9,10 +9,23 @@ disk = { main = { type = "disk"; - device = "/dev/vda"; + device = "/dev/sda"; content = { type = "gpt"; partitions = { + # Modern EFI System Partition (ESP) + ESP = { + priority = 1; + name = "ESP"; + size = "1G"; # 1GB gives plenty of space for multiple NixOS kernels/generations + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = ["umask=0077"]; + }; + }; root = { size = "100%"; content = {