nixos/home: Migrate river WAN to PPPoE over Digiweb

river's WAN moves to a PPPoE session (Digiweb, over VLAN 10 with baby-jumbo
1508 MTU) driven by pppd, with its ip-up/ip-down hooks toggling a new
wan-online.target. stream keeps its DHCP WAN, so the existing 50-wan /
50-wan-ifb networkd config moves out of routing-common into stream, and the
shared consumers (ipsec, ipv6-clear-default-route) now attach to
wan-online.target instead of depending on systemd-networkd-wait-online@wan
directly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-07-19 22:37:05 +01:00
parent a8318d3de2
commit e63cee7b09
4 changed files with 152 additions and 51 deletions
+47 -2
View File
@@ -6,9 +6,11 @@
nixpkgs = "mine";
home-manager = "mine";
configuration = { lib, pkgs, config, ... }:
configuration = { lib, pkgs, config, assignments, ... }:
let
inherit (lib);
inherit (lib) mkMerge;
inherit (lib.my) networkdAssignment;
inherit (lib.my.c) networkd;
in
{
imports = [ ./routing-common/mstpd.nix ];
@@ -75,6 +77,14 @@
};
};
# WAN is a plain networkd-managed DHCP link here; gate the shared wan-online
# target on networkd reporting it online.
systemd.targets.wan-online = {
requires = [ "systemd-networkd-wait-online@wan.service" ];
after = [ "systemd-networkd-wait-online@wan.service" ];
wantedBy = [ "multi-user.target" ];
};
systemd.network = {
netdevs = {
"25-lan" = {
@@ -147,6 +157,41 @@
matchConfig.Name = "lan-dave";
networkConfig.Bridge = "lan";
};
"50-wan-ifb" = {
matchConfig.Name = "wan-ifb";
networkConfig = networkd.noL3;
extraConfig = ''
[CAKE]
Bandwidth=490M
RTTSec=50ms
PriorityQueueingPreset=besteffort
# DOCSIS preset
OverheadBytes=18
MPUBytes=64
CompensationMode=none
'';
};
"50-wan" = mkMerge [
(networkdAssignment "wan" assignments.modem)
{
matchConfig.Name = "wan";
DHCP = "ipv4";
dns = [ "127.0.0.1" "::1" ];
dhcpV4Config.UseDNS = false;
qdiscConfig = {
Parent = "ingress";
Handle = "0xffff";
};
extraConfig = ''
[CAKE]
Parent=root
Bandwidth=48M
RTTSec=50ms
'';
}
];
};
};