From b5168a9900ec8943ad9a7778bd2935f69f17703b Mon Sep 17 00:00:00 2001 From: Jonathan Ringer Date: Tue, 26 Nov 2024 21:18:21 +0200 Subject: [PATCH] nixos/iso-image: fix `isoImage.grubTheme = null;` Fixes `error: cannot coerce null to a string` --- nixos/modules/installer/cd-dvd/iso-image.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 63abf88cab09..cf2cdb8eecef 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -335,12 +335,14 @@ let set textmode=true terminal_output console } + + ${lib.optionalString (config.isoImage.grubTheme != null) '' hiddenentry 'GUI mode' --hotkey 'g' { $(find ${config.isoImage.grubTheme} -iname '*.pf2' -printf "loadfont (\$root)/EFI/BOOT/grub-theme/%P\n") set textmode=false terminal_output gfxterm } - + ''} # If the parameter iso_path is set, append the findiso parameter to the kernel # line. We need this to allow the nixos iso to be booted from grub directly.