From 960b91828a057e38c3a28d6d3f70e1b42df83bfc Mon Sep 17 00:00:00 2001 From: chn Date: Mon, 19 Jun 2023 13:35:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A6=81=E7=94=A8os-prober=EF=BC=8C=E6=89=8B?= =?UTF-8?q?=E5=8A=A8=E8=AE=BE=E7=BD=AEwindows=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/boot/basic.nix | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/modules/boot/basic.nix b/modules/boot/basic.nix index 93a43ba6..fff05f33 100644 --- a/modules/boot/basic.nix +++ b/modules/boot/basic.nix @@ -14,7 +14,26 @@ # device = "/dev/disk/by-id/nvme-KINGSTON_SNVS2000G_50026B73815C12A8"; device = "nodev"; efiSupport = true; - useOSProber = 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 + } + ''; }; }; };