diff options
-rw-r--r-- | nixos/modules/services/networking/znc.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/modules/services/networking/znc.nix b/nixos/modules/services/networking/znc.nix index c408899a322e..763843fdec00 100644 --- a/nixos/modules/services/networking/znc.nix +++ b/nixos/modules/services/networking/znc.nix @@ -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" ]; |