Dual Booting NixOS and Windows: Difference between revisions
→Grub: Remove old info
m (→System time: concise) |
(→Grub: Remove old info) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
=== systemd-boot === | === systemd-boot === | ||
When {{ic|systemd-boot}} is installed to the same EFI System Partition (ESP) that Windows uses, it will automatically detect the Windows installation ({{ic|/EFI/Microsoft/Boot/bootmgfw.efi}}) and present it as a boot option. | |||
You can verify detected boot loaders by running the {{ic|bootctl}} command. | |||
A system pre-installed with Windows might have a small ESP partition size that is not sufficient to store the kernel and initrd files for multiple NixOS generations. One solution is to create an additional [https://uapi-group.org/specifications/specs/boot_loader_specification/#the-partitions XBOOTLDR] partition and configure {{ic|systemd-boot}} to use it: | |||
{{File|/etc/nixos/configuration.nix|nix|<nowiki> | |||
{ | |||
fileSystems."/boot" = | |||
{ device = "/dev/disk/by-uuid/57D4-A2B2"; | |||
fsType = "vfat"; | |||
}; | |||
fileSystems."/efi" = | |||
{ device = "/dev/disk/by-uuid/3280-5418"; | |||
fsType = "vfat"; | |||
}; | |||
boot.loader.systemd-boot.enable = true; | |||
boot.loader.efi.canTouchEfiVariables = true; | |||
boot.loader.efi.efiSysMountPoint = "/efi"; | |||
boot.loader.systemd-boot.xbootldrMountPoint = "/boot"; | |||
} | |||
</nowiki>}} | |||
=== os-prober === | === os-prober === | ||
Line 56: | Line 78: | ||
==== Grub ==== | ==== Grub ==== | ||
Here we assume: | Here we assume: | ||
Line 126: | Line 145: | ||
{{file|/etc/nixos/configuration.nix|nix|<nowiki> | {{file|/etc/nixos/configuration.nix|nix|<nowiki> | ||
{ | |||
time.hardwareClockInLocalTime = true; | time.hardwareClockInLocalTime = true; | ||
}</nowiki>}} | }</nowiki>}} |