Template remaining host-specific values (WAN wifi, LAN/eth0, NVMe, nftables)

nftables.conf hardcoded the R5C network, van-br0-setup.service the R5C
interfaces and several configs wlan0/eth0. All now come from the host
config; the onboard LAN port is skipped when ONBOARD_LAN_IFACE is empty.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-23 14:32:09 -04:00
co-authored by Claude Sonnet 5
parent 164cb30d93
commit d704069ffc
11 changed files with 57 additions and 17 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
# Starlink + cellular as uplinks, the wired port earns its keep as LAN instead.
# NM must leave it alone (see van-ap-unmanaged.conf) for networkd to own it here.
[Match]
Name=eth0
Name=@ONBOARD_LAN_IFACE@
[Link]
RequiredForOnline=no
+1 -1
View File
@@ -34,7 +34,7 @@ network:
passthrough:
ipv4.never-default: "true"
wifis:
wlan0:
@WIFI_WAN_IFACE@:
renderer: NetworkManager
optional: true
dhcp4: true
+1 -1
View File
@@ -6,6 +6,6 @@ delete table ip van_router_nat
table ip van_router_nat {
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
ip saddr 10.42.1.0/24 oifname != "br0" masquerade;
ip saddr @GATEWAY_NETWORK@ oifname != "br0" masquerade;
}
}
+2 -2
View File
@@ -1,5 +1,5 @@
[keyfile]
# The AP wlans (5GHz + 2.4GHz) and the wired LAN ports (USB dongle + onboard
# eth0) are all owned by systemd-networkd/hostapd (bridged into br0), so
# port) are all owned by systemd-networkd/hostapd (bridged into br0), so
# NetworkManager must not touch them.
unmanaged-devices=interface-name:@WIFI_5G_IFACE@;interface-name:@WIFI_2G_IFACE@;interface-name:@LAN_IFACE@;interface-name:eth0
unmanaged-devices=interface-name:@WIFI_5G_IFACE@;interface-name:@WIFI_2G_IFACE@;interface-name:@LAN_IFACE@@ONBOARD_LAN_UNMANAGED@
+2 -2
View File
@@ -5,8 +5,8 @@ Wants=systemd-networkd.service hostapd.service
[Service]
Type=oneshot
ExecStart=/bin/bash -c "brctl addif br0 enP2p33s0 2>/dev/null || true"
ExecStart=/bin/bash -c "brctl addif br0 wlp1s0 2>/dev/null || true"
ExecStart=/bin/bash -c "brctl addif br0 @LAN_IFACE@ 2>/dev/null || true"
ExecStart=/bin/bash -c "brctl addif br0 @WIFI_5G_IFACE@ 2>/dev/null || true"
RemainAfterExit=yes
[Install]