summaryrefslogtreecommitdiffstats
path: root/nixos/modules/installer/cd-dvd
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2023-08-14 19:43:20 -0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2023-09-06 14:10:09 -0400
commit2de1bd778ccc90cef078970106bf7fc67fb23c54 (patch)
treed84ad2b057a98b42c5d5e180005abed746045098 /nixos/modules/installer/cd-dvd
parent7fa7158c600e419d8f4ed47d6bc989d2a56e4932 (diff)
nixos/iso-image: Remove leftover false dichotomy between console/serial
Relying on the built-in UEFI console here was already necessary, so we are losing nothing by removing the needless `serial` call, which hung some systems. This also makes the implementation much easier to understand. Also, no ugly-font menu anymore!
Diffstat (limited to 'nixos/modules/installer/cd-dvd')
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix38
1 files changed, 10 insertions, 28 deletions
diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix
index 2b70b75d7ccd..0b5135c088ea 100644
--- a/nixos/modules/installer/cd-dvd/iso-image.nix
+++ b/nixos/modules/installer/cd-dvd/iso-image.nix
@@ -200,25 +200,13 @@ let
"auto"
]}
- # Fonts can be loaded?
- # (This font is assumed to always be provided as a fallback by NixOS)
- if loadfont (\$root)/EFI/boot/unicode.pf2; then
- set with_fonts=true
- fi
- if [ "\$textmode" != "true" -a "\$with_fonts" == "true" ]; then
- # Use graphical term, it can be either with background image or a theme.
- # input is "console", while output is "gfxterm".
- # Otherwise the failure mode is to not even enable gfxterm.
- # Note that "with_serial" relies on the EFI console.
- if test "\$with_serial" == "yes"; then
- terminal_output console
- terminal_input console
- else
- terminal_output gfxterm
- terminal_input console
- fi
+ if [ "\$textmode" == "false" ]; then
+ terminal_output gfxterm
+ terminal_input console
else
- # Sets colors for the non-graphical term.
+ terminal_output console
+ terminal_input console
+ # Sets colors for console term.
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
fi
@@ -288,6 +276,9 @@ let
"search_fs_uuid"
"search_fs_file"
"echo"
+
+ # We're not using it anymore, but we'll leave it in so it can be used
+ # by user, with the console using "C"
"serial"
# Graphical mode stuff
@@ -330,17 +321,10 @@ let
cat <<EOF > $out/EFI/boot/grub.cfg
- set with_fonts=false
set textmode=${boolToString (config.isoImage.forceTextMode)}
- # If you want to use serial for "terminal_*" commands, you need to set one up:
- # Example manual configuration:
- # → serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1
- # This uses the defaults, and makes the serial terminal available.
- set with_serial=no
- export with_serial
- clear
set timeout=${toString grubEfiTimeout}
+ clear
# This message will only be viewable on the default (UEFI) console.
echo ""
echo "Loading graphical boot menu..."
@@ -352,14 +336,12 @@ let
hiddenentry 'Text mode' --hotkey 't' {
loadfont (\$root)/EFI/boot/unicode.pf2
- set with_serial=yes
set textmode=true
terminal_output console
}
hiddenentry 'GUI mode' --hotkey 'g' {
$(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/boot/grub-theme/%P\n")
set textmode=false
- set with_serial=no
terminal_output gfxterm
}