summary refs log tree commit diff
path: root/nixos/modules/installer/cd-dvd/iso-image.nix
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2023-08-14 18:11:31 -0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2023-09-06 14:09:03 -0400
commit7fa7158c600e419d8f4ed47d6bc989d2a56e4932 (patch)
tree3f1da7bed9bf060795b576e53a1bb72fe6671cc2 /nixos/modules/installer/cd-dvd/iso-image.nix
parent16d640c81044ca439b6356156516a7885c1864af (diff)
downloadnixpkgs-7fa7158c600e419d8f4ed47d6bc989d2a56e4932.tar
nixpkgs-7fa7158c600e419d8f4ed47d6bc989d2a56e4932.tar.gz
nixpkgs-7fa7158c600e419d8f4ed47d6bc989d2a56e4932.tar.bz2
nixpkgs-7fa7158c600e419d8f4ed47d6bc989d2a56e4932.tar.lz
nixpkgs-7fa7158c600e419d8f4ed47d6bc989d2a56e4932.tar.xz
nixpkgs-7fa7158c600e419d8f4ed47d6bc989d2a56e4932.tar.zst
nixpkgs-7fa7158c600e419d8f4ed47d6bc989d2a56e4932.zip
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.
Diffstat (limited to 'nixos/modules/installer/cd-dvd/iso-image.nix')
-rw-r--r--nixos/modules/installer/cd-dvd/iso-image.nix14
1 files 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 1c38e29aefa..2b70b75d7cc 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 <<EOF > $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.
       '';
     };