nixos/tautulli: add option to open firewall

This commit is contained in:
Ryan Horiguchi 2022-08-12 00:34:23 +02:00 committed by Winter
parent bd2c13dc11
commit feba340314

View File

@ -32,6 +32,12 @@ in
description = lib.mdDoc "TCP port where Tautulli listens.";
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = "Open ports in the firewall for Tautulli.";
};
user = mkOption {
type = types.str;
default = "plexpy";
@ -74,6 +80,8 @@ in
};
};
networking.firewall.allowedTCPPorts = mkIf cfg.openFirewall [ cfg.port ];
users.users = mkIf (cfg.user == "plexpy") {
plexpy = { group = cfg.group; uid = config.ids.uids.plexpy; };
};