From feba3403147903d848f5e76f30315f4f04fb280d Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Fri, 12 Aug 2022 00:34:23 +0200 Subject: [PATCH] nixos/tautulli: add option to open firewall --- nixos/modules/services/misc/tautulli.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/nixos/modules/services/misc/tautulli.nix b/nixos/modules/services/misc/tautulli.nix index 3f6633c9a57..20d972b757a 100644 --- a/nixos/modules/services/misc/tautulli.nix +++ b/nixos/modules/services/misc/tautulli.nix @@ -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; }; };