diff --git a/hosts/deadbeef/boot.nix b/hosts/deadbeef/boot.nix new file mode 100644 index 0000000..7c595a5 --- /dev/null +++ b/hosts/deadbeef/boot.nix @@ -0,0 +1,28 @@ +{ ... }: +{ + # Don't use the systemd-boot EFI boot loader. + # Necessary for dual boot Windows + boot.loader.systemd-boot.enable = false; + + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + grub = { + enable = true; + devices = [ "nodev" ]; + efiSupport = true; + extraEntries = '' + menuentry "Windows" { + insmod part_gpt + insmod fat + insmod search_fs_uuid + insmod chain + search --fs-uuid --set=root FE74-E293 + chainloader /EFI/Microsoft/Boot/bootmgfw.efi + } + ''; + }; + }; +} diff --git a/hosts/deadbeef/default.nix b/hosts/deadbeef/default.nix index ea0caf0..1326725 100644 --- a/hosts/deadbeef/default.nix +++ b/hosts/deadbeef/default.nix @@ -8,35 +8,10 @@ { imports = [ ./hardware-configuration.nix + ./boot.nix # home-manager.nixosModules.home-manager ]; - # Don't use the systemd-boot EFI boot loader. - # Necessary for dual boot Windows - boot.loader.systemd-boot.enable = false; - - boot.loader = { - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot"; - }; - grub = { - enable = true; - devices = [ "nodev" ]; - efiSupport = true; - extraEntries = '' - menuentry "Windows" { - insmod part_gpt - insmod fat - insmod search_fs_uuid - insmod chain - search --fs-uuid --set=root FE74-E293 - chainloader /EFI/Microsoft/Boot/bootmgfw.efi - } - ''; - }; - }; - my = { desktop = {