nixos-module/container/upstream: disable dhcp6 just for flpk-gw
This commit is contained in:
parent
82594811d4
commit
2133522dc8
|
@ -31,27 +31,29 @@ in
|
|||
Assign = false;
|
||||
};
|
||||
};
|
||||
} // builtins.mapAttrs (_: { upstream, ... }: {
|
||||
DHCP = "yes";
|
||||
networkConfig.IPv6AcceptRA = true;
|
||||
dhcpV6Config.PrefixDelegationHint = "::/56";
|
||||
|
||||
# Traffic Shaping
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
Parent = root
|
||||
${lib.optionalString (upstream.provider == "vodafone") ''
|
||||
# DOCSIS overhead
|
||||
OverheadBytes = 18
|
||||
''}
|
||||
${lib.optionalString (upstream.provider == "dsi") ''
|
||||
# PPPoE overhead
|
||||
OverheadBytes = 18
|
||||
''}
|
||||
${lib.optionalString (upstream.upBandwidth != null) ''
|
||||
Bandwidth = ${toString upstream.upBandwidth}K
|
||||
''}
|
||||
'';
|
||||
} // builtins.mapAttrs (_: { upstream, ... }:
|
||||
lib.optionalAttrs (hostName != "flpk-gw") {
|
||||
DHCP = "yes";
|
||||
networkConfig.IPv6AcceptRA = true;
|
||||
dhcpV6Config.PrefixDelegationHint = "::/56";
|
||||
} // {
|
||||
# Traffic Shaping
|
||||
extraConfig = ''
|
||||
[CAKE]
|
||||
Parent = root
|
||||
${lib.optionalString (upstream.provider == "vodafone") ''
|
||||
# DOCSIS overhead
|
||||
OverheadBytes = 18
|
||||
''}
|
||||
${lib.optionalString (upstream.provider == "dsi") ''
|
||||
# PPPoE overhead
|
||||
OverheadBytes = 18
|
||||
''}
|
||||
${lib.optionalString (upstream.upBandwidth != null) ''
|
||||
Bandwidth = ${toString upstream.upBandwidth}K
|
||||
''}
|
||||
'';
|
||||
}
|
||||
}) upstreamInterfaces;
|
||||
|
||||
networking.nat = lib.optionalAttrs enabled {
|
||||
|
|
Loading…
Reference in New Issue