Skip to content

Commit

Permalink
test: NAT
Browse files Browse the repository at this point in the history
  • Loading branch information
jz8132543 committed Mar 5, 2024
1 parent e3f1fd6 commit 98a9de5
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions nixos/modules/base/environment/isNAT/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,22 @@ in
The port of http alt
'';
};
};
# Traefik
options = {
services.traefik.dynamicConfigOptions.http.routers = mkOption {
type = types.attrsOf types.submodule {
options.entryPoints = mkOption {
type = types.listOf types.str;
default = ["https-alt"];
};
services.traefik.dynamicConfigOptions.http.routers =
# if config.environment.isNAT
# then
mkOption {
type = types.attrsOf (types.submodule ({config, ...}: {
freeformType = types.attrsOf types.list;
config.entryPoints = ["https-alt"];
options.entryPoints = mkOption {
type = types.listOf types.str;
default = ["https-alt"];
};
}));
};
};
# lib.concatMapAttrs (name: _: {
# ${name}.entryPoints = ["https" "https-alt"];
# })
# // config.services.traefik.dynamicConfigOptions.http.routers;
# else {};
};
config = {
networking.firewall.allowedTCPPorts = with config.environment; [AltHTTPS AltHTTP];
networking.firewall.allowedUDPPorts = with config.environment; [AltHTTPS];
};
Expand Down

0 comments on commit 98a9de5

Please sign in to comment.