create 'lib.vpnNamespaceOpenPort'

This commit is contained in:
2025-08-20 12:28:13 -04:00
parent c272eb9d5b
commit 306e320a3a
3 changed files with 26 additions and 32 deletions

21
lib.nix
View File

@@ -54,5 +54,26 @@ inputs.nixpkgs.lib.extend (
"-march=znver3"
"-mtune=znver3"
];
vpnNamespaceOpenPort =
port:
{ ... }:
{
vpnNamespaces.wg = {
portMappings = [
{
from = port;
to = port;
}
];
openVPNPorts = [
{
port = port;
protocol = "both";
}
];
};
};
}
)