1
0
Fork 0
mirror of https://git.sr.ht/~roxwize/.dotfiles synced 2025-05-07 22:23:07 +00:00
This commit is contained in:
Rae 5e 2025-03-07 22:21:40 -05:00
parent 9e407cd78f
commit fe52c9c97c
Signed by: rae
GPG key ID: 5B1A0FAB9BAB81EE
6 changed files with 170 additions and 2 deletions

View file

@ -7,6 +7,14 @@ in with lib; {
type = types.bool;
default = false;
};
listenPortHTTP = mkOption {
type = types.int;
default = 80;
};
listenPortHTTPS = mkOption {
type = types.int;
default = 443;
};
api-password = mkOption {
type = types.str;
default = "";
@ -21,10 +29,14 @@ in with lib; {
TZ = config.time.timeZone;
FTLCONF_webserver_api_password = mkIf (cfg.api-password != "") cfg.api-password;
};
ports = [
(builtins.toString cfg.listenPortHTTP + ":80")
(builtins.toString cfg.listenPortHTTPS + ":443")
];
};
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ 53 80 443 ];
allowedTCPPorts = [ 53 cfg.listenPortHTTP cfg.listenPortHTTPS ];
};
}
]);