From 2133522dc8e8da7219d68af952137ea83461b87a Mon Sep 17 00:00:00 2001 From: Astro Date: Sun, 18 Sep 2022 18:59:22 +0200 Subject: [PATCH] nixos-module/container/upstream: disable dhcp6 just for flpk-gw --- nix/nixos-module/container/upstream.nix | 44 +++++++++++++------------ 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/nix/nixos-module/container/upstream.nix b/nix/nixos-module/container/upstream.nix index 908883e..f3c88d5 100644 --- a/nix/nixos-module/container/upstream.nix +++ b/nix/nixos-module/container/upstream.nix @@ -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 {