diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-05-29 14:24:20 +0200 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-06-08 16:29:29 +0200 |
commit | 8b22107e5d0bdeb300fb33b5a40aed2057a66b94 (patch) | |
tree | ec2df97d8be877b40e24712aefd06b4dcdcc7f65 /gnu/bootloader.scm | |
parent | 45f523d9f018c262900e94b0f70f17b05118941c (diff) | |
download | guix-8b22107e5d0bdeb300fb33b5a40aed2057a66b94.tar guix-8b22107e5d0bdeb300fb33b5a40aed2057a66b94.tar.gz |
bootloader: Use menu-entry to define custom bootloader entries.
* gnu/bootloader.scm (<menu-entry>): New variable. Export associated getters,
This record is extracted from grub module.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Use
menu-entry->boot-parameters to convert menu-entry records to
boot-parameters.
* gnu/bootloader/grub.scm (<menu-entry>): Remove.
(boot-parameters->menu-entry): Remove.
(grub-configuration-file): Use boot-parameters to create configuration
entries.
* gnu/system.scm (menu-entry->boot-parameters): New exported procedure.
Diffstat (limited to 'gnu/bootloader.scm')
-rw-r--r-- | gnu/bootloader.scm | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gnu/bootloader.scm b/gnu/bootloader.scm index 4e77974d31..d5fcf30f05 100644 --- a/gnu/bootloader.scm +++ b/gnu/bootloader.scm @@ -23,7 +23,15 @@ #:use-module (guix records) #:use-module (guix ui) #:use-module (srfi srfi-1) - #:export (bootloader + #:export (menu-entry + menu-entry? + menu-entry-label + menu-entry-device + menu-entry-linux + menu-entry-linux-arguments + menu-entry-initrd + + bootloader bootloader? bootloader-name bootloader-package @@ -50,6 +58,22 @@ ;;; +;;; Menu-entry record. +;;; + +(define-record-type* <menu-entry> + menu-entry make-menu-entry + menu-entry? + (label menu-entry-label) + (device menu-entry-device ; file system uuid, label, or #f + (default #f)) + (linux menu-entry-linux) + (linux-arguments menu-entry-linux-arguments + (default '())) ; list of string-valued gexps + (initrd menu-entry-initrd)) ; file name of the initrd as a gexp + + +;;; ;;; Bootloader record. ;;; |