nixos/colony: Replicate port forwards for internal routing
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{ lib }:
|
||||
let
|
||||
inherit (builtins) length match elemAt filter;
|
||||
inherit (builtins) length match elemAt filter replaceStrings;
|
||||
inherit (lib)
|
||||
genAttrs mapAttrsToList filterAttrsRecursive nameValuePair types
|
||||
mkOption mkOverride mkForce mkIf mergeEqualOption optional
|
||||
@@ -123,6 +123,12 @@ rec {
|
||||
home-manager = mkOpt' (enum [ "unstable" "stable" "mine" "mine-stable" ]) "unstable" "Branch of home-manager to use.";
|
||||
};
|
||||
|
||||
nft = rec {
|
||||
ipEscape = replaceStrings ["." ":"] ["-" "-"];
|
||||
natFilterChain = ip: "filter-fwd-${ipEscape ip}";
|
||||
dnatChain = ip: "fwd-${ipEscape ip}";
|
||||
};
|
||||
|
||||
mkVLAN = name: vid: {
|
||||
"25-${name}" = {
|
||||
netdevConfig = {
|
||||
|
Reference in New Issue
Block a user