Nix: fix extension of splashImage

This commit is contained in:
Leon 2024-03-26 10:21:10 +01:00
parent eda1b86dd8
commit a634923206

View File

@ -139,13 +139,10 @@
grub2-theme grub2-theme
]; ];
boot.loader.grub = boot.loader.grub =
let
ext = if cfg.splashImage == null then "jpg" else last (splitString "." cfg.splashImage);
in
{ {
theme = "${grub2-theme}/grub/themes/${cfg.theme}"; theme = "${grub2-theme}/grub/themes/${cfg.theme}";
splashImage = splashImage =
"${grub2-theme}/grub/themes/${cfg.theme}/background.${ext}"; "${grub2-theme}/grub/themes/${cfg.theme}/background.jpg";
gfxmodeEfi = "${resolution},auto"; gfxmodeEfi = "${resolution},auto";
gfxmodeBios = "${resolution},auto"; gfxmodeBios = "${resolution},auto";
extraConfig = '' extraConfig = ''