From e74bf299d955ccf732973fa08885238c7101ec99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Tue, 23 May 2023 15:27:01 +0100 Subject: [PATCH] add windows 11 setup --- config/services/router.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/config/services/router.nix b/config/services/router.nix index 5b8c6378..e121e2b0 100644 --- a/config/services/router.nix +++ b/config/services/router.nix @@ -3,12 +3,33 @@ pkgs, ... }: let + win11Iso = pkgs.stdenv.mkDerivation { + name = "win11.iso"; + buildPhase = '' + echo "Manually add a win11.iso with the correct hash to your store" + + exit 1 + ''; + + outputHash = "0kmn7r8c4a46nldh50igbkscymvkjiwx5ic6n38vbx0sqvkwgijb"; + outputHashMode = "flat"; + outputHashAlgo = "sha256"; + }; + win11IsoDir = pkgs.stdenv.mkDerivation { + name = "win11"; + buildPhase = "true"; + installPhase = '' + mkdir $out + ln -sv ${win11Iso} $out/win11.iso + ''; + }; bootIpxeX86Script = pkgs.writeTextDir "boot.ipxe" '' #!ipxe :start menu iPXE boot menu item --gap -- ------------------------- Operating systems ------------------------------ item --key n linux (N)ixOS (netboot) + item --key w windows (W)indows 11 (installer) item --gap -- ----------------------------- Utilities ---------------------------------- item --key e ext (E)xit item --key s shell EFI (S)hell @@ -17,6 +38,9 @@ :linux chain http://192.168.2.1/x86_64/netboot.ipxe + :windows + sanboot http://192.168.2.1/x86_64/win11.iso + :shell chain http://192.168.2.1/x86_64/shell.efi @@ -32,6 +56,7 @@ nixos-config-for-netboot.nixosConfigurations.netboot.config.system.build.netbootIpxeScript pkgs.edk2-uefi-shell bootIpxeX86Script + win11IsoDir ]; }; bootIpxeScript = pkgs.writeText "boot.ipxe" ''