nixpkgs/nixos/modules/system/boot/loader
Felix Uhl 73011ba96f nixos/systemd-boot: add windows option for easy dual-booting
When installing NixOS on a machine with Windows, the "easiest" solution
to dual-boot is re-using the existing EFI System Partition (ESP), which
allows systemd-boot to detect Windows automatically.

However, if there are multiple ESPs, maybe even on multiple disks,
systemd-boot is unable to detect the other OSes, and you either have to
use Grub and os-prober, or do a tedious manual configuration as
described in the wiki:
https://wiki.nixos.org/w/index.php?title=Dual_Booting_NixOS_and_Windows&redirect=no#EFI_with_multiple_disks

This commit automates and documents this properly so only a single line
like

    boot.loader.systemd-boot.windows."10".efiDeviceHandle = "HD0c2";

is required.

In the future, we might want to try automatically detecting this
during installation, but finding the correct device handle while the
kernel is running is tricky.
2024-10-11 10:56:02 +02:00
..
external nixos: remove all uses of lib.mdDoc 2024-04-13 10:07:35 -07:00
generations-dir nixos/system: fix grammatical error in docs 2024-07-25 18:19:35 +02:00
generic-extlinux-compatible nixos/generic-extlinux-compatible: add mirroredBoots option 2024-09-04 12:02:57 +02:00
grub nixos/grub: fix value precendence with optional -> mkIf 2024-09-01 12:13:15 +02:00
init-script nixos: remove all uses of lib.mdDoc 2024-04-13 10:07:35 -07:00
raspberrypi nixos: remove all uses of lib.mdDoc 2024-04-13 10:07:35 -07:00
systemd-boot nixos/systemd-boot: add windows option for easy dual-booting 2024-10-11 10:56:02 +02:00
efi.nix nixos/boot.loader.efi: remove with lib; 2024-09-15 10:43:58 +02:00
loader.nix nixos: remove all uses of lib.mdDoc 2024-04-13 10:07:35 -07:00