diff --git a/modules/installer/grub/grub-menu-builder.sh b/modules/installer/grub/grub-menu-builder.sh index c09b13f801d..1cce302fdf0 100644 --- a/modules/installer/grub/grub-menu-builder.sh +++ b/modules/installer/grub/grub-menu-builder.sh @@ -28,32 +28,25 @@ esac prologue() { - if test -n "@splashImage@"; then - splashLocation="@splashImage@" - if test "$grubVersion" -eq 1 ; then - # Splash images in /nix/store don't seem to work, so copy them. - cp -f $splashLocation /boot/background.xpm.gz - splashLocation="$bootDevice/background.xpm.gz" - fi - fi - case "$grubVersion" in 1) + cp -f "@splashImage@" /boot/background.xpm.gz cat > "$1" << GRUBEND # Automatically generated. DO NOT EDIT THIS FILE! default @default@ timeout @timeout@ GRUBEND if test -n "@splashImage@"; then - echo "splashimage $splashLocation" >> "$1" + echo "splashimage $bootDevice/background.xpm.gz" >> "$1" fi ;; 2) + cp -f @grub@/share/grub/unicode.pf2 /boot/grub/unicode.pf2 cat > "$1" <> "$1" < version == 2; + environment.systemPackages = mkIf config.boot.loader.grub.enable [ grub ]; - if version == 1 - then [ pkgs.grub ] - else [ pkgs.grub2 ]); - - # and many other things that have to be moved inside this file. - }; }