summaryrefslogtreecommitdiff
path: root/gnu/bootloader
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2019-12-30 11:25:40 +0100
committerJan Nieuwenhuizen <janneke@gnu.org>2020-01-25 16:09:12 +0100
commitf52fe7c3f29dfd0804c9d1f297b91287eabcdfb2 (patch)
treeed9226101779b0a35d06fbba2e5efe07b0adc0e8 /gnu/bootloader
parent170d5844dd9e565c6b28c774403cda21981643f8 (diff)
bootloader: grub: Add gfxmode (resolution) override.
* gnu/bootloader/grub.scm (<grub-theme>): Add `gfxmode' entry. (eye-candy): Use it. * doc/guix.texi (Bootloader Configuration): Document it.
Diffstat (limited to 'gnu/bootloader')
-rw-r--r--gnu/bootloader/grub.scm19
1 files changed, 15 insertions, 4 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index f13685ac9dd..b99f5fa4f4b 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -3,6 +3,7 @@
3;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com> 3;;; Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
4;;; Copyright © 2017 Leo Famulari <leo@famulari.name> 4;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
5;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> 5;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
6;;; Copyright © 2019 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
6;;; 7;;;
7;;; This file is part of GNU Guix. 8;;; This file is part of GNU Guix.
8;;; 9;;;
@@ -88,7 +89,9 @@ denoting a file name."
88 (color-normal grub-theme-color-normal 89 (color-normal grub-theme-color-normal
89 (default '((fg . cyan) (bg . blue)))) 90 (default '((fg . cyan) (bg . blue))))
90 (color-highlight grub-theme-color-highlight 91 (color-highlight grub-theme-color-highlight
91 (default '((fg . white) (bg . blue))))) 92 (default '((fg . white) (bg . blue))))
93 (gfxmode grub-gfxmode
94 (default '("auto")))) ;list of string
92 95
93(define %background-image 96(define %background-image
94 (grub-image 97 (grub-image
@@ -149,8 +152,16 @@ system string---e.g., \"x86_64-linux\"."
149 ;; most other modern architectures have no other mode and therefore don't 152 ;; most other modern architectures have no other mode and therefore don't
150 ;; need to be switched. 153 ;; need to be switched.
151 (if (string-match "^(x86_64|i[3-6]86)-" system) 154 (if (string-match "^(x86_64|i[3-6]86)-" system)
152 " 155 (string-append
153 # Leave 'gfxmode' to 'auto'. 156 "
157"
158 (let ((gfxmode (and=>
159 (and=> config bootloader-configuration-theme)
160 grub-gfxmode)))
161 (if gfxmode
162 (string-append "set gfxmode=" (string-join gfxmode ";"))
163 "# Leave 'gfxmode' to 'auto'."))
164 "
154 insmod video_bochs 165 insmod video_bochs
155 insmod video_cirrus 166 insmod video_cirrus
156 insmod gfxterm 167 insmod gfxterm
@@ -166,7 +177,7 @@ system string---e.g., \"x86_64-linux\"."
166 insmod vbe 177 insmod vbe
167 insmod vga 178 insmod vga
168 fi 179 fi
169" 180")
170 "")) 181 ""))
171 182
172 (define (setup-gfxterm config font-file) 183 (define (setup-gfxterm config font-file)