mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-13 21:50:33 +03:00
znc: fix openFirewall option
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).
This commit is contained in:
parent
34750bb51c
commit
dd50575d5a
1 changed files with 9 additions and 9 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue