From ebe4cee5b1aeed80c927e06dbb70efac5b137143 Mon Sep 17 00:00:00 2001 From: Vineet Kumar Date: Wed, 21 Jan 2026 01:19:18 -0500 Subject: saklas: didn't realize it wasn't uefi --- epistemia/bootloader.scm | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/epistemia/bootloader.scm b/epistemia/bootloader.scm index 90137a3..413b0d7 100644 --- a/epistemia/bootloader.scm +++ b/epistemia/bootloader.scm @@ -3,10 +3,9 @@ #:use-module (guix gexp) #:use-module (guix utils) #:use-module (gnu bootloader) - #:use-module (gnu bootloader grub) - #:export (grub-zfs)) + #:use-module (gnu bootloader grub)) -(define grub-zfs +(define-public grub-zfs (bootloader (inherit grub-efi-bootloader) (name 'grub-zfs) @@ -22,3 +21,21 @@ "set root=(hd0,gpt2)") ((" /store/") " /gnu/@/store/"))))))) + +;; TODO combine into previous with an argument? +(define-public grub-zfs-bios + (bootloader + (inherit grub-bootloader) + (name 'grub-zfs) + (installer + #~(lambda (bootloader targets mount-point) + (use-modules (guix build utils)) + (let ((standard-installer #$(bootloader-installer grub-bootloader))) + (standard-installer bootloader targets mount-point)) + (let ((grub-cfg (string-append mount-point "/boot/grub/grub.cfg"))) + (chmod grub-cfg #o644) + (substitute* grub-cfg + (("search --label --set [^ ]+") + "set root=(hd0,gpt2)") + ((" /store/") + " /gnu/@/store/"))))))) -- cgit v1.2.3