Merge pull request #29171 from vaibhavsagar/znc-open-firewall

znc: open firewall with configured port
This commit is contained in:
Jörg Thalheim 2017-09-10 14:34:29 +01:00 committed by GitHub
commit 7641d0e335

View File

@ -276,6 +276,14 @@ in
'';
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
Whether to open ports in the firewall for ZNC.
'';
};
passBlock = mkOption {
example = defaultPassBlock;
type = types.string;
@ -350,6 +358,10 @@ in
config = mkIf cfg.enable {
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.port ];
};
systemd.services.znc = {
description = "ZNC Server";
wantedBy = [ "multi-user.target" ];