guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: G-Expressions for boot-parameters or grub-configuration-file ?


From: Danny Milosavljevic
Subject: Re: G-Expressions for boot-parameters or grub-configuration-file ?
Date: Mon, 17 Apr 2017 01:02:38 +0200

Forgot to mention the following chunk:

--- gnu/system/grub.scm 2017-04-16 02:01:46.621445795 +0200
+++ /home/dannym/src/guix/gnu/system/grub.scm   2017-04-16 00:26:19.654626204 
+0200
@@ -267,6 +267,15 @@
         (#f
          #~(format #f "search --file --set ~a" #$file)))))
 
+(define (boot-parameters->menu-entry conf)
+  (menu-entry
+   (label (boot-parameters-label conf))
+   (device (boot-parameters-store-device conf))
+   (device-mount-point (boot-parameters-store-mount-point conf))
+   (linux (boot-parameters-kernel conf))
+   (linux-arguments (boot-parameters-kernel-arguments conf))
+   (initrd (boot-parameters-initrd conf))))
+
 (define* (grub-configuration-file config entries
                                   #:key
                                   (system (%current-system))
@@ -276,7 +285,7 @@
 <file-system> object.  OLD-ENTRIES is taken to be a list of menu entries
 corresponding to old generations of the system."
   (define all-entries
-    (append entries
+    (append (map boot-parameters->menu-entry entries)
             (grub-configuration-menu-entries config)))
 
   (define entry->gexp
@@ -323,7 +332,7 @@
             #$@(if (pair? old-entries)
                    #~((format port "
 submenu \"GNU system, old configurations...\" {~%")
-                      #$@(map entry->gexp old-entries)
+                      #$@(map entry->gexp (map boot-parameters->menu-entry 
old-entries))
                       (format port "}~%"))
                    #~()))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]