Files
nixos/hosts/jude/boot.nix
T

50 lines
1.2 KiB
Nix
Raw Normal View History

2023-12-11 12:25:35 -06:00
{ lib, pkgs, ... }:
2022-04-27 11:23:11 -05:00
{
# Use the systemd-boot EFI boot loader.
2023-08-17 11:11:03 -05:00
boot = {
2024-03-04 23:12:30 -06:00
kernelPackages = pkgs.linuxPackages_latest;
2023-08-17 11:11:03 -05:00
supportedFilesystems = [ "ntfs" ];
loader = {
2023-12-11 12:25:35 -06:00
timeout = 15;
2023-08-17 13:57:30 -05:00
systemd-boot = {
2023-08-18 19:12:57 -05:00
enable = true;
2023-12-11 12:25:35 -06:00
configurationLimit = 20;
2023-08-17 13:57:30 -05:00
extraEntries = {
"Windows.conf" = (lib.strings.concatStringsSep "\n" [
"title Windows"
2023-08-18 19:12:57 -05:00
"efi /EFI/Microsoft/EFI/bootmgfw.efi"
2023-08-17 13:57:30 -05:00
]);
2023-12-11 12:25:35 -06:00
"Win2.conf" = (lib.strings.concatStringsSep "\n" [
"title Windows 11"
"efi /shellx64.efi"
"options -nointerrupt -noconsolein -noconsoleout windows11.nsh"
2023-12-05 13:20:04 -06:00
]);
2023-12-11 12:25:35 -06:00
"Shell.conf" = (lib.strings.concatStringsSep "\n" [
"title EFI Shell"
"efi /shell.efi"
2023-12-05 13:20:04 -06:00
]);
2023-08-17 13:57:30 -05:00
};
2023-12-11 12:25:35 -06:00
extraFiles = {
"windows11.nsh" = (pkgs.writeText "windows11.nsh" (lib.strings.concatStringsSep "\n" [
]));
"shell.efi" = "${pkgs.edk2-uefi-shell}/shell.efi";
};
2023-08-17 13:57:30 -05:00
};
2023-08-17 11:11:03 -05:00
grub = {
2023-08-18 19:12:57 -05:00
enable = false;
2023-08-17 11:11:03 -05:00
device = "/dev/nvme0n1";
useOSProber = true;
2023-08-17 13:57:30 -05:00
efiSupport = true;
2023-08-17 11:11:03 -05:00
extraEntries = ''
menuentry "Windows" --class windows --class os {
2023-08-17 13:57:30 -05:00
insmod ntfs
chainloader (hd0,0)/EFI/Windows/bootmgfw.efi
2023-08-17 11:11:03 -05:00
}
'';
};
2023-08-17 13:57:30 -05:00
#efi.canTouchEfiVariables = true;
2023-08-17 11:11:03 -05:00
};
};
2022-04-27 11:23:11 -05:00
}