forked from zentralwerk/network
nixos-module/container/dhcp-server: enhance matching for pxe/efi/rpi4
This commit is contained in:
parent
2c9d36ff00
commit
eeef53a268
|
@ -44,7 +44,7 @@ in
|
||||||
''
|
''
|
||||||
) config.site.dns.localZones}
|
) config.site.dns.localZones}
|
||||||
|
|
||||||
option arch code 93 = unsigned integer 16;
|
option guid code 97 = text;
|
||||||
group {
|
group {
|
||||||
default-lease-time ${toString dhcp.time};
|
default-lease-time ${toString dhcp.time};
|
||||||
max-lease-time ${toString dhcp.max-time};
|
max-lease-time ${toString dhcp.max-time};
|
||||||
|
@ -53,17 +53,24 @@ in
|
||||||
option domain-name-servers 172.20.73.8, 9.9.9.9;
|
option domain-name-servers 172.20.73.8, 9.9.9.9;
|
||||||
ddns-domainname "${domainName}";
|
ddns-domainname "${domainName}";
|
||||||
|
|
||||||
next-server ${config.site.net.serv.hosts4.nfsroot};
|
class "pxeclients" {
|
||||||
if option arch = 00:00 {
|
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
|
||||||
filename "netboot.xyz.kpxe";
|
|
||||||
} else {
|
next-server ${config.site.net.serv.hosts4.nfsroot};
|
||||||
filename "netboot.xyz.efi";
|
option tftp-server-address ${config.site.net.serv.hosts4.nfsroot};
|
||||||
}
|
if suffix(reverse(1, option guid), 5) = 34:69:50:52:00 {
|
||||||
if option vendor-class-identifier = "PXEClient:Arch:00000:UNDI:002001" {
|
# RPi4
|
||||||
# RPi4
|
option vendor-class-identifier "PXEClient";
|
||||||
option vendor-class-identifier "PXEClient";
|
option vendor-encapsulated-options "Raspberry Pi Boot";
|
||||||
option vendor-encapsulated-options "Raspberry Pi Boot";
|
option tftp-server-name "${config.site.net.serv.hosts4.nfsroot}";
|
||||||
option tftp-server-name "${config.site.net.serv.hosts4.nfsroot}";
|
} elsif option pxe-system-type = 00:00 {
|
||||||
|
filename "netboot.xyz.kpxe"; # BIOS
|
||||||
|
} elsif option pxe-system-type = 00:07 {
|
||||||
|
filename "netboot.xyz.efi"; # EFI
|
||||||
|
option bootfile-name "netboot.xyz.efi";
|
||||||
|
} elsif option pxe-system-type = 00:06 {
|
||||||
|
filename "netboot.xyz.efi"; # ia32_EFI
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
subnet ${subnet4Net} netmask ${lib.netmasks.${toString subnet4Len}} {
|
subnet ${subnet4Net} netmask ${lib.netmasks.${toString subnet4Len}} {
|
||||||
|
|
Loading…
Reference in New Issue