mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-30 00:34:00 +00:00
nixos/sabnzbd: add openFirewall
This commit is contained in:
parent
0db2b0471e
commit
d3d5b72c65
@ -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 ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user