nixos-module/container/upstream: disable dhcp6 just for flpk-gw

This commit is contained in:
Astro 2022-09-18 18:59:22 +02:00
parent 82594811d4
commit 2133522dc8
1 changed files with 23 additions and 21 deletions

View File

@ -31,27 +31,29 @@ in
Assign = false; Assign = false;
}; };
}; };
} // builtins.mapAttrs (_: { upstream, ... }: { } // builtins.mapAttrs (_: { upstream, ... }:
DHCP = "yes"; lib.optionalAttrs (hostName != "flpk-gw") {
networkConfig.IPv6AcceptRA = true; DHCP = "yes";
dhcpV6Config.PrefixDelegationHint = "::/56"; networkConfig.IPv6AcceptRA = true;
dhcpV6Config.PrefixDelegationHint = "::/56";
# Traffic Shaping } // {
extraConfig = '' # Traffic Shaping
[CAKE] extraConfig = ''
Parent = root [CAKE]
${lib.optionalString (upstream.provider == "vodafone") '' Parent = root
# DOCSIS overhead ${lib.optionalString (upstream.provider == "vodafone") ''
OverheadBytes = 18 # DOCSIS overhead
''} OverheadBytes = 18
${lib.optionalString (upstream.provider == "dsi") '' ''}
# PPPoE overhead ${lib.optionalString (upstream.provider == "dsi") ''
OverheadBytes = 18 # PPPoE overhead
''} OverheadBytes = 18
${lib.optionalString (upstream.upBandwidth != null) '' ''}
Bandwidth = ${toString upstream.upBandwidth}K ${lib.optionalString (upstream.upBandwidth != null) ''
''} Bandwidth = ${toString upstream.upBandwidth}K
''; ''}
'';
}
}) upstreamInterfaces; }) upstreamInterfaces;
networking.nat = lib.optionalAttrs enabled { networking.nat = lib.optionalAttrs enabled {