diff --git a/nix/lib/config/legacy.nix b/nix/lib/config/legacy.nix index d4ea811..a1e2bea 100644 --- a/nix/lib/config/legacy.nix +++ b/nix/lib/config/legacy.nix @@ -129,7 +129,7 @@ in stubNets6 = ospfConf.stubnets-inet6; }; - forwardedPorts = + forwardPorts = if ctPillar ? port-forwarding then map ({ proto, port, to }: { proto = proto; diff --git a/nix/lib/config/options.nix b/nix/lib/config/options.nix index e1ccfe1..f5b4091 100644 --- a/nix/lib/config/options.nix +++ b/nix/lib/config/options.nix @@ -157,7 +157,7 @@ let type = types.bool; default = config.site.hosts.${name}.interfaces ? core; }; - forwardedPorts = mkOption { + forwardPorts = mkOption { type = with types; listOf (submodule { options = { proto = mkOption { type = types.enum [ "tcp" "udp" ]; diff --git a/nix/nixos-module/container/anon.nix b/nix/nixos-module/container/anon.nix index 59396a3..0844da7 100644 --- a/nix/nixos-module/container/anon.nix +++ b/nix/nixos-module/container/anon.nix @@ -94,6 +94,6 @@ in enableIPv6 = true; internalInterfaces = [ "core" ]; externalInterface = firstTunnel; - forwardPorts = config.site.hosts.${hostName}.forwardedPorts; + inherit (config.site.hosts.${hostName}) forwardPorts; }; } diff --git a/nix/nixos-module/container/upstream.nix b/nix/nixos-module/container/upstream.nix index 178549d..b502d39 100644 --- a/nix/nixos-module/container/upstream.nix +++ b/nix/nixos-module/container/upstream.nix @@ -49,6 +49,6 @@ in enable = true; internalInterfaces = [ "core" ]; externalInterface = firstUpstreamInterface; - forwardPorts = config.site.hosts.${hostName}.forwardedPorts; + inherit (config.site.hosts.${hostName}) forwardPorts; }; }