nixpkgs/nixos/modules/system
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
..
activation activation: avoid error due to unset PATH variable (#340488) 2024-09-10 21:58:24 +02:00
boot nixos/systemd-boot: add windows option for easy dual-booting 2024-10-11 10:56:02 +02:00
etc treewide/nixos: remove with lib; part 2 (#335618) 2024-08-30 15:56:57 -07:00
build.nix nixos: remove all uses of lib.mdDoc 2024-04-13 10:07:35 -07:00