znc: add openFirewall configuration option
This commit is contained in:
parent
83d89e9b22
commit
c7dd5e146b
@ -276,6 +276,14 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
openFirewall = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to open ports in the firewall for ZNC.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
passBlock = mkOption {
|
passBlock = mkOption {
|
||||||
example = defaultPassBlock;
|
example = defaultPassBlock;
|
||||||
type = types.string;
|
type = types.string;
|
||||||
@ -350,7 +358,9 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ cfg.port ];
|
networking.firewall = mkIf cfg.openFirewall {
|
||||||
|
allowedTCPPorts = [ cfg.port ];
|
||||||
|
};
|
||||||
|
|
||||||
systemd.services.znc = {
|
systemd.services.znc = {
|
||||||
description = "ZNC Server";
|
description = "ZNC Server";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user