commit ebe4cee5b1aeed80c927e06dbb70efac5b137143 parent ee757cdd4dad2fb5feb3f36fce33f3ab9d3ce9ea Author: Vineet Kumar <git@vineetk.net> Date: Wed, 21 Jan 2026 01:19:18 -0500 saklas: didn't realize it wasn't uefi Diffstat:
| M | epistemia/bootloader.scm | | | 23 | ++++++++++++++++++++--- |
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git 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/")))))))