nixos/modules/boot/basic.nix

43 lines
930 B
Nix
Raw Normal View History

2023-06-09 21:09:52 +08:00
{ efi, timeout ? 5 }: { pkgs, ... }@inputs:
2023-06-05 21:53:13 +08:00
{
config =
{
boot =
{
loader =
{
2023-06-09 21:14:22 +08:00
timeout = timeout;
2023-06-19 11:20:20 +08:00
efi = { canTouchEfiVariables = true; efiSysMountPoint = "/boot/efi"; };
grub =
{
enable = true;
# device = "/dev/disk/by-id/nvme-KINGSTON_SNVS2000G_50026B73815C12A8";
device = "nodev";
efiSupport = true;
useOSProber = false;
extraEntries =
''
menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root 7317-1DB6
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry "Windows for malware" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root 7321-FA9C
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
'';
2023-06-19 11:20:20 +08:00
};
2023-06-05 21:53:13 +08:00
};
};
hardware.enableAllFirmware = true;
};
}