From 7fa7158c600e419d8f4ed47d6bc989d2a56e4932 Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Mon, 14 Aug 2023 18:11:31 -0400 Subject: [PATCH] nixos/iso-image: graphicalGrub -> forceTextMode This helps keep logic simpler, as what we do is forcing text mode, which means the non-default case is `truthy`, making things easier to digest in the config file. Also renaming this option is considered "internal", since it lives only within the `iso-image` namespace, and also not a breaking change since it was not part of a stable release. --- nixos/modules/installer/cd-dvd/iso-image.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 1c38e29aefa4..2b70b75d7ccd 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -331,7 +331,7 @@ let cat < $out/EFI/boot/grub.cfg set with_fonts=false - set textmode=${boolToString (!config.isoImage.graphicalGrub)} + 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 @@ -709,13 +709,17 @@ in ''; }; - isoImage.graphicalGrub = mkOption { - default = true; + isoImage.forceTextMode = mkOption { + default = false; type = types.bool; example = true; description = lib.mdDoc '' - Whether to use textmode or graphical grub. - false means we use textmode grub. + Whether to use text mode instead of graphical grub. + A value of `true` means graphical mode is not tried to be used. + + This is useful for validating that graphics mode usage is not at the root cause of a problem with the iso image. + + If text mode is required off-handedly (e.g. for serial use) you can use the `T` key, after being prompted, to use text mode for the current boot. ''; };