about summary refs log tree commit diff
path: root/nixos/modules/system/boot/loader/grub
diff options
context:
space:
mode:
authorGraham Christensen <graham@grahamc.com>2018-06-05 10:37:12 -0400
committerGraham Christensen <graham@grahamc.com>2018-06-05 13:11:26 -0400
commit52de38f5f40a97dc46bbb9a442903f26e087bd30 (patch)
tree1e12785ac3ccba26df7ea647813a34f376eff630 /nixos/modules/system/boot/loader/grub
parent23bfa472ad38e9b423ad6078e498b5f24834ebcc (diff)
downloadnixlib-52de38f5f40a97dc46bbb9a442903f26e087bd30.tar
nixlib-52de38f5f40a97dc46bbb9a442903f26e087bd30.tar.gz
nixlib-52de38f5f40a97dc46bbb9a442903f26e087bd30.tar.bz2
nixlib-52de38f5f40a97dc46bbb9a442903f26e087bd30.tar.lz
nixlib-52de38f5f40a97dc46bbb9a442903f26e087bd30.tar.xz
nixlib-52de38f5f40a97dc46bbb9a442903f26e087bd30.tar.zst
nixlib-52de38f5f40a97dc46bbb9a442903f26e087bd30.zip
grub-config.xml: handle a null font
Diffstat (limited to 'nixos/modules/system/boot/loader/grub')
-rw-r--r--nixos/modules/system/boot/loader/grub/grub.nix5
1 files changed, 3 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix
index 67daaa333e5e..2e497ff9f2c4 100644
--- a/nixos/modules/system/boot/loader/grub/grub.nix
+++ b/nixos/modules/system/boot/loader/grub/grub.nix
@@ -64,9 +64,10 @@ let
       )) + ":" + (makeSearchPathOutput "bin" "sbin" [
         pkgs.mdadm pkgs.utillinux
       ]);
-      font = if lib.last (lib.splitString "." cfg.font) == "pf2"
+      font = if cfg.font == null then ""
+        else (if lib.last (lib.splitString "." cfg.font) == "pf2"
              then cfg.font
-             else "${convertedFont}";
+             else "${convertedFont}");
     });
 
   bootDeviceCounters = fold (device: attr: attr // { "${device}" = (attr."${device}" or 0) + 1; }) {}