From cfa36b97fc38ec18e1c6fda7e74a35b002ce6920 Mon Sep 17 00:00:00 2001 From: beatzaplenty Date: Mon, 27 Jul 2026 13:44:29 +1000 Subject: [PATCH] added dnsmasq to pxe-boot --- modules/build-types/pxe-boot.nix | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/build-types/pxe-boot.nix b/modules/build-types/pxe-boot.nix index 1f59723..d3626d7 100644 --- a/modules/build-types/pxe-boot.nix +++ b/modules/build-types/pxe-boot.nix @@ -417,6 +417,27 @@ in ExecStart = stageSystemRescue; }; }; + dnsmasq = { + enable = true; + settings = { + # Proxy mode: respond only to PXE DHCP requests, leave normal leases to router + dhcp-range = [ "192.168.2.0,proxy" ]; + # iPXE client detection + dhcp-match = [ + "set:ipxe,175" + "set:efi64,option:client-arch,7" + "set:efi64,option:client-arch,9" + ]; + dhcp-userclass = "set:ipxe,iPXE"; + # Boot file selection + dhcp-boot = [ + "tag:ipxe,tag:efi64,http://${vars.pxeServerIp}/boot.ipxe" + "tag:ipxe,http://${vars.pxeServerIp}/boot.ipxe" + "tag:efi64,ipxe.efi,,${vars.pxeServerIp}" + "undionly.kpxe,,${vars.pxeServerIp}" + ]; + }; + }; }; };