netboot: support efi netboot

This commit is contained in:
Astro 2021-06-18 21:31:17 +02:00
parent 8ccbba2fa3
commit 13334f087c
2 changed files with 12 additions and 3 deletions

View File

@ -53,7 +53,11 @@ in
ddns-domainname "${domainName}";
next-server ${config.site.net.serv.hosts4.netboot};
filename "netboot.xyz.kpxe";
if option arch = 00:07 {
filename "netboot.xyz.efi";
} else {
filename "netboot.xyz.kpxe";
}
subnet ${subnet4Net} netmask ${lib.netmasks.${toString subnet4Len}} {
range ${dhcp.start} ${dhcp.end};

View File

@ -1,12 +1,17 @@
{ lib, pkgs, ... }:
let
netboot_xyz = pkgs.fetchurl {
netboot_xyz_efi = pkgs.fetchurl {
url = "https://github.com/netbootxyz/netboot.xyz/releases/download/2.0.40/netboot.xyz.efi";
sha256 = "1gvgvlaxhjkr9i0b2bjq85h12ni9h5fn6r8nphsag3il9kificcc";
};
netboot_xyz_kpxe = pkgs.fetchurl {
url = "https://github.com/netbootxyz/netboot.xyz/releases/download/2.0.40/netboot.xyz.kpxe";
sha256 = "1crkr995i1hv3q548gx2xan1ymxmzcnr7mxaf77s2410mpqfcx82";
};
tftpRoot = pkgs.runCommand "tftproot" {} ''
mkdir -p $out
ln -s ${netboot_xyz} $out/netboot.xyz.kpxe
ln -s ${netboot_xyz_efi} $out/netboot.xyz.efi
ln -s ${netboot_xyz_kpxe} $out/netboot.xyz.kpxe
'';
in
{