1
Fork 0
satellite/hosts/nixos/tethys/boot.nix

41 lines
1.2 KiB
Nix
Raw Normal View History

2023-03-12 23:34:42 +01:00
{ inputs, ... }: {
2024-04-29 14:24:28 +02:00
imports = [ inputs.darkmatter-grub-theme.nixosModule ];
2023-03-12 23:34:42 +01:00
# See [the wiki page](https://nixos.wiki/wiki/Dual_Booting_NixOS_and_Windows)
2023-01-10 02:38:06 +01:00
boot.loader = {
efi = {
canTouchEfiVariables = true;
# assuming /boot is the mount point of the EFI partition in NixOS (as the installation section recommends).
efiSysMountPoint = "/boot";
};
grub = {
# despite what the configuration.nix manpage seems to indicate,
# as of release 17.09, setting device to "nodev" will still call
# `grub-install` if efiSupport is true
# (the devices list is not used by the EFI grub install,
# but must be set to some value in order to pass an assert in grub.nix)
devices = [ "nodev" ];
efiSupport = true;
enable = true;
# set $FS_UUID to the UUID of the EFI partition
extraEntries = ''
menuentry "Windows" {
insmod part_gpt
insmod fat
insmod search_fs_uuid
insmod chain
search --fs-uuid --set=root $FS_UUID
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
'';
2024-04-29 14:24:28 +02:00
darkmatter-theme = {
enable = true;
style = "nixos";
icon = "color";
resolution = "1080p";
};
2023-01-10 02:38:06 +01:00
};
};
}