Add windows to boot menu

Hi, my PC had windows installed. Then, I installed NixOS to a different physical drive. Now when the PC boots up it shows the NixOS boot menu. I want to add windows to this boot menu. I don’t want to use GRUB.

How do I accomplish this?


systemd-boot will only examine the files on its own physical drive. Now, when I set up a dual boot, I installed Windows second, and Windows for some reason put its boot manager on my NixOS drive’s ESP even though I installed Windows to a different physical drive. Because of this, systemd-boot does see the Windows boot manager and display it as a boot option. I don’t know if you can replicate this after the fact now though.

Thanks for the reply. Maybe I need to resort to using GRUB after all? Will it do the job?

You can try mounting Windows esp (usually 100MB FAT32 partition). Copying the EFI/Microsoft folder to your NixOS /boot partition’s EFI directory.
Note: I tried this only on a single physical drive, unlike the system OP has. In my case, systemd boot was not even showing Windows as an option.

well, you’re not technically supposed to have two ESPs on one physical drive, which is why Windows will install its ESP to an existing one if you try to dual boot on the same drive. But the 100M ESP that Windows makes if you install it first isn’t very big, which is why we now have support for xbootldr with systemd-boot. If Windows and systemd-boot share an ESP, systemd-boot will show Windows.

Looks good! Is there a way for me to test it out? Can I install the package from unstable? And is it compatible with lanzaboote?