commit 71b1f4e8ba30b7c39992b4fcb79d03d20f4fe1ff parent 4a6cd098a485ec0d846ff977ac29ae4ce10a6617 Author: vin <git@vineetk.net> Date: Mon, 22 Dec 2025 12:33:48 -0500 work on zfs grub config and initrd Diffstat:
| A | epistemia/bootloader.scm | | | 24 | ++++++++++++++++++++++++ |
1 file changed, 24 insertions(+), 0 deletions(-)
diff --git a/epistemia/bootloader.scm b/epistemia/bootloader.scm @@ -0,0 +1,24 @@ +;;; SPDX-License-Identifier: GPL-3.0-or-later +(define-module (epistemia bootloader) + #:use-module (guix gexp) + #:use-module (guix utils) + #:use-module (gnu bootloader) + #:use-module (gnu bootloader grub) + #:export (grub-zfs)) + +(define grub-zfs + (bootloader + (inherit grub-efi-bootloader) + (name 'grub-zfs) + (installer + #~(lambda (bootloader targets mount-point) + (use-modules (guix build utils)) + (let ((standard-installer #$(bootloader-installer grub-efi-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/")))))))