services.murmur: add openFirewall option
This commit is contained in:
parent
10812f61cc
commit
17e93b090e
|
@ -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" ];
|
||||
|
|
Loading…
Reference in a new issue