From 17e93b090e5c1470b2c45617c48f85b41df7e224 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 24 Jul 2022 10:27:48 +0200 Subject: [PATCH] services.murmur: add openFirewall option --- nixos/modules/services/networking/murmur.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/nixos/modules/services/networking/murmur.nix b/nixos/modules/services/networking/murmur.nix index 06ec04dbbf16..84b9936aa623 100644 --- a/nixos/modules/services/networking/murmur.nix +++ b/nixos/modules/services/networking/murmur.nix @@ -59,6 +59,14 @@ in description = "If enabled, start the Murmur Mumble server."; }; + openFirewall = mkOption { + type = types.bool; + default = false; + description = '' + Open ports in the firewall for the Murmur Mumble server. + ''; + }; + autobanAttempts = mkOption { type = types.int; default = 10; @@ -291,6 +299,11 @@ in gid = config.ids.gids.murmur; }; + networking.firewall = mkIf cfg.openFirewall { + allowedTCPPorts = [ cfg.port ]; + allowedUDPPorts = [ cfg.port ]; + }; + systemd.services.murmur = { description = "Murmur Chat Service"; wantedBy = [ "multi-user.target" ];