From 54032cc6088ec4d6e0ebb370c0897d94f6f8dbfa Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Tue, 30 Apr 2024 15:04:23 -0500 Subject: [PATCH] update config --- nixos/telperion/configuration.nix | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/nixos/telperion/configuration.nix b/nixos/telperion/configuration.nix index b28280a..59eb316 100644 --- a/nixos/telperion/configuration.nix +++ b/nixos/telperion/configuration.nix @@ -62,24 +62,29 @@ extraConfig = import ./config/bind.nix {inherit config;}; }; + # Proxy DHCP for PXE booting. This leaves DHCP address allocation alone and dhcp clients + # should merge all responses from their DHCPDISCOVER request. + # https://matchbox.psdn.io/network-setup/#proxy-dhcp services.dnsmasq = { enable = true; resolveLocalQueries = false; settings = { - port=0; + # Disables only the DNS port. + port = 0; dhcp-range = [ "10.1.1.1,proxy,255.255.255.0" ]; enable-tftp = true; - tftp-root="/srv/tftp"; + tftp-root = "/srv/tftp"; + # if request comes from iPXE user class, set tag "ipxe" + dhcp-userclass = "set:ipxe,iPXE"; # if request comes from older PXE ROM, chainload to iPXE (via TFTP) - # also this hack sucks, but it works + # ALSO + # point ipxe tagged requests to the matchbox iPXE boot script (via HTTP) + # pxe-service="tag:ipxe,0,matchbox,http://10.1.1.57:8080/boot.ipxe"; + # also this double pxe-service config hack sucks, but it works. pxe-service='' tag:#ipxe,x86PC,"PXE chainload to iPXE",undionly.kpxe pxe-service=tag:ipxe,0,matchbox,http://10.1.1.57:8080/boot.ipxe ''; - # if request comes from iPXE user class, set tag "ipxe" - dhcp-userclass="set:ipxe,iPXE"; - # point ipxe tagged requests to the matchbox iPXE boot script (via HTTP) - # pxe-service="tag:ipxe,0,matchbox,http://10.1.1.57:8080/boot.ipxe"; log-queries = true; log-dhcp = true; };