summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--epistemia/bootloader.scm23
1 files 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 @@
3 #:use-module (guix gexp) 3 #:use-module (guix gexp)
4 #:use-module (guix utils) 4 #:use-module (guix utils)
5 #:use-module (gnu bootloader) 5 #:use-module (gnu bootloader)
6 #:use-module (gnu bootloader grub) 6 #:use-module (gnu bootloader grub))
7 #:export (grub-zfs))
8 7
9(define grub-zfs 8(define-public grub-zfs
10 (bootloader 9 (bootloader
11 (inherit grub-efi-bootloader) 10 (inherit grub-efi-bootloader)
12 (name 'grub-zfs) 11 (name 'grub-zfs)
@@ -22,3 +21,21 @@
22 "set root=(hd0,gpt2)") 21 "set root=(hd0,gpt2)")
23 ((" /store/") 22 ((" /store/")
24 " /gnu/@/store/"))))))) 23 " /gnu/@/store/")))))))
24
25;; TODO combine into previous with an argument?
26(define-public grub-zfs-bios
27 (bootloader
28 (inherit grub-bootloader)
29 (name 'grub-zfs)
30 (installer
31 #~(lambda (bootloader targets mount-point)
32 (use-modules (guix build utils))
33 (let ((standard-installer #$(bootloader-installer grub-bootloader)))
34 (standard-installer bootloader targets mount-point))
35 (let ((grub-cfg (string-append mount-point "/boot/grub/grub.cfg")))
36 (chmod grub-cfg #o644)
37 (substitute* grub-cfg
38 (("search --label --set [^ ]+")
39 "set root=(hd0,gpt2)")
40 ((" /store/")
41 " /gnu/@/store/")))))))