-
-
Save samueldr/6b987327e18b1399d3064fa1bc9e2fd5 to your computer and use it in GitHub Desktop.
since it didn't git apply
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/nixos/modules/system/boot/loader/grub/grub.nix b/nixos/modules/system/boot/loader/grub/grub.nix | |
index 0d83391de89..5154f2771b7 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; }) {} | |
diff --git a/nixos/modules/system/boot/loader/grub/install-grub.pl b/nixos/modules/system/boot/loader/grub/install-grub.pl | |
index 8bd203106f5..fd49fb9a08e 100644 | |
--- a/nixos/modules/system/boot/loader/grub/install-grub.pl | |
+++ b/nixos/modules/system/boot/loader/grub/install-grub.pl | |
@@ -281,22 +281,24 @@ else { | |
else | |
insmod vbe | |
fi | |
- insmod font | |
- if loadfont " . $grubBoot->path . "/converted-font.pf2; then | |
- insmod gfxterm | |
- if [ \"\${grub_platform}\" = \"efi\" ]; then | |
- set gfxmode=$gfxmodeEfi | |
- set gfxpayload=keep | |
- else | |
- set gfxmode=$gfxmodeBios | |
- set gfxpayload=text | |
- fi | |
- terminal_output gfxterm | |
- fi | |
"; | |
if ($font) { | |
copy $font, "$bootPath/converted-font.pf2" or die "cannot copy $font to $bootPath\n"; | |
+ $conf .= " | |
+ insmod font | |
+ if loadfont " . $grubBoot->path . "/converted-font.pf2; then | |
+ insmod gfxterm | |
+ if [ \"\${grub_platform}\" = \"efi\" ]; then | |
+ set gfxmode=$gfxmodeEfi | |
+ set gfxpayload=keep | |
+ else | |
+ set gfxmode=$gfxmodeBios | |
+ set gfxpayload=text | |
+ fi | |
+ terminal_output gfxterm | |
+ fi | |
+ "; | |
} | |
if ($splashImage) { | |
# FIXME: GRUB 1.97 doesn't resize the background image if it |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment