From 9a96b3c8e08bb7855d765e8ab5b3244816c138b1 Mon Sep 17 00:00:00 2001 From: Lumpiasty Date: Tue, 12 Aug 2025 02:41:23 +0200 Subject: [PATCH] add windows entry in gaming pc --- hosts/gaming-pc.nix | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/hosts/gaming-pc.nix b/hosts/gaming-pc.nix index caa4b3d..2b53a21 100644 --- a/hosts/gaming-pc.nix +++ b/hosts/gaming-pc.nix @@ -9,8 +9,26 @@ hardware.enableRedistributableFirmware = true; # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.systemd-boot.graceful = true; + boot.loader.systemd-boot = { + enable = true; + graceful = true; + windows = { + "windows" = + let + # To determine the name of the windows boot drive, boot into edk2 first, then run + # `map -c` to get drive aliases, and try out running `FS1:`, then `ls EFI` to check + # which alias corresponds to which EFI partition. + boot-drive = "FS0"; + in + { + title = "Windows"; + efiDeviceHandle = boot-drive; + sortKey = "y_windows"; + }; + }; + edk2-uefi-shell.enable = true; + edk2-uefi-shell.sortKey = "z_edk2"; + }; boot.loader.efi.canTouchEfiVariables = true; # Kernel