fix(grub): mkDefault for enable, add device

This commit is contained in:
Infinidoge 2021-09-16 14:29:29 -04:00
parent 0f7681a216
commit 111bb74de7

View file

@ -1,7 +1,8 @@
{ ... }: { { lib, ... }: {
boot.loader = { boot.loader = {
grub = { grub = {
enable = true; enable = lib.mkDefault true;
device = "/dev/disk/by-uuid/6836-6848";
efiSupport = true; efiSupport = true;
useOSProber = true; useOSProber = true;
extraEntries = '' extraEntries = ''
@ -56,16 +57,16 @@
} }
} }
menuentry 'Windows Boot Manager' --class windows --class os $menuentry_id_option ' osprober-efi-6836-6848' { menuentry 'Windows Boot Manager' --class windows --class os $menuentry_id_option ' osprober-efi-6836-6848' {
insmod part_gpt insmod part_gpt
insmod fat insmod fat
if [ x$feature_platform_search_hint = xy ]; then if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root 6836-6848 search --no-floppy --fs-uuid --set=root 6836-6848
else else
search --no-floppy --fs-uuid --set=root 6836-6848 search --no-floppy --fs-uuid --set=root 6836-6848
fi fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi chainloader /EFI/Microsoft/Boot/bootmgfw.efi
} }
''; '';
}; };
efi = { efi = {