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:
@@ -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
@@ -34,7 +34,7 @@ network:
|
||||
passthrough:
|
||||
ipv4.never-default: "true"
|
||||
wifis:
|
||||
wlan0:
|
||||
@WIFI_WAN_IFACE@:
|
||||
renderer: NetworkManager
|
||||
optional: true
|
||||
dhcp4: true
|
||||
|
||||
+1
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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@
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user