nixos/serviio: add option to open firewall ports

I think we should have open firewall ports and let the user choose if they want to have these ports open or not. :D
This commit is contained in:
n 2025-10-03 21:17:58 +05:30 committed by GitHub
commit 4f67d0e4f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -39,6 +39,14 @@ in
'';
};
openFirewall = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
Open ports in the firewall for the Serviio Media Server.
'';
};
dataDir = lib.mkOption {
type = lib.types.path;
default = "/var/lib/serviio";
@ -76,7 +84,7 @@ in
users.groups.serviio = { };
networking.firewall = {
networking.firewall = lib.mkIf cfg.openFirewall {
allowedTCPPorts = [
8895 # serve UPnP responses
23423 # console