Merge pull request #29874 from mbrgm/znc-fix
znc: fix openFirewall option
This commit is contained in:
commit
2b8cba2ff5
@ -212,6 +212,14 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
openFirewall = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Whether to open ports in the firewall for ZNC.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
zncConf = mkOption {
|
zncConf = mkOption {
|
||||||
default = "";
|
default = "";
|
||||||
example = "See: http://wiki.znc.in/Configuration";
|
example = "See: http://wiki.znc.in/Configuration";
|
||||||
@ -276,14 +284,6 @@ 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;
|
||||||
@ -359,7 +359,7 @@ in
|
|||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
networking.firewall = mkIf cfg.openFirewall {
|
networking.firewall = mkIf cfg.openFirewall {
|
||||||
allowedTCPPorts = [ cfg.port ];
|
allowedTCPPorts = [ cfg.confOptions.port ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.znc = {
|
systemd.services.znc = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user