Skip to content

Commit

Permalink
znc: fix openFirewall option
Browse files Browse the repository at this point in the history
The current version is broken:
- there's no `openFirewall` attribute directly in the `cfg` set
- the `port` option is an attribute of the `confOptions` set

I used the proper attribute for the firewall port and moved the `openFirewall`
option directly up to the `services.znc` set, as it's rather a general option
for the whole service than a znc-specific option (which are located inside the
`confOptions` set).
  • Loading branch information
mbrgm authored and Mic92 committed Sep 27, 2017
1 parent 24f0aec commit b9935c7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions nixos/modules/services/networking/znc.nix
Expand Up @@ -212,6 +212,14 @@ in
'';
};

openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
Whether to open ports in the firewall for ZNC.
'';
};

zncConf = mkOption {
default = "";
example = "See: http://wiki.znc.in/Configuration";
Expand Down Expand Up @@ -276,14 +284,6 @@ 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;
Expand Down Expand Up @@ -359,7 +359,7 @@ in
config = mkIf cfg.enable {

networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.port ];
allowedTCPPorts = [ cfg.confOptions.port ];
};

systemd.services.znc = {
Expand Down

0 comments on commit b9935c7

Please sign in to comment.