nixos/sabnzbd: add openFirewall

This commit is contained in:
Sam Weston 2024-02-11 16:48:05 +00:00
parent 0db2b0471e
commit d3d5b72c65

View file

@ -36,6 +36,14 @@ in
default = "sabnzbd";
description = lib.mdDoc "Group to run the service as";
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
Open ports in the firewall for the sabnzbd web interface
'';
};
};
};
@ -68,5 +76,9 @@ in
ExecStart = "${lib.getBin cfg.package}/bin/sabnzbd -d -f ${cfg.configFile}";
};
};
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ 8080 ];
};
};
}