feat(pxe-infra): add isolated bridge + MAC-filtered DHCP module (L2)
Adds the L2 layer of the PXE pipeline test bed (docs/ARCHITECTURE.md
§L2) to rydiwo only — isolated private subnet, never touches LAN.
- modules/options.nix: options.pxe-infra.{enable, bridge, dhcp.*,
guests[]} — fully typed, default master toggle is off so the
existing rydiwo build is unchanged
- modules/pxe-infra/default.nix: umbrella that imports the two
sub-modules; inert when the master toggle is off
- modules/pxe-infra/bridge.nix: idempotent systemd oneshot that
creates the Linux bridge, assigns the lab host a private IPv4,
and is explicitly NetworkManager.unmanaged so NM does not
reconfigure it
- modules/pxe-infra/dhcp.nix: dnsmasq as DHCP-only on the bridge
only (bind-interfaces + interface=, port=0 disables DNS, no-resolv,
no-poll, cache-size=0); MAC-filtered via dhcp-host=…,set:known and
dhcp-ignore=tag:!known when authoritative=false
- configurations/mini-laptop.nix: adds modules/pxe-infra to
imports, plus a commented example showing how to enable for a
real guest
Sidesteps docs/OPEN-QUESTIONS.md Q21 (LAN-permission) by design:
a fully isolated bridge satisfies L2 without the lab node answering
DHCP on the real LAN. nix flake check passes for all six hosts.
Refs: docs/ARCHITECTURE.md §L2, docs/OPEN-QUESTIONS.md F20/F21/F23.
This commit is contained in:
1 parent
df02a71c03
commit
a940356e0a
5 files changed
+329
No files matched your search
@@ -14,6 +14,7 @@
|
||||
nixos-hardware.nixosModules.chuwi-minibook-x
|
||||
./hardware/mini-laptop.nix
|
||||
self.nixosModules.default
|
||||
../modules/pxe-infra
|
||||
];
|
||||
|
||||
boot = {
|
||||
@@ -34,4 +35,26 @@
|
||||
hardware.intel-gpu-tools.enable = true;
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# PXE infrastructure rig (L2 of docs/ARCHITECTURE.md).
|
||||
# Uncomment to enable on rydiwo. The rig gives rydiwo an isolated Linux
|
||||
# bridge (`pxe-infra.bridge.name`, default `pxe0`) plus a MAC-filtered
|
||||
# dnsmasq DHCP server bound only to that bridge — the real LAN is not
|
||||
# touched. See `modules/options.nix` (options.pxe-infra.*) for the
|
||||
# full option surface and `modules/pxe-infra/` for the implementation.
|
||||
#
|
||||
# pxe-infra = {
|
||||
# enable = true;
|
||||
# bridge.address = "10.66.0.1";
|
||||
# bridge.prefixLength = 24;
|
||||
# dhcp.guests = [
|
||||
# {
|
||||
# mac = "52:54:00:12:34:56";
|
||||
# ip = "10.66.0.10";
|
||||
# hostname = "pxe-vm-01"; # optional
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
# --------------------------------------------------------------------------
|
||||
}
|
||||
Reference in new issue
Block a user