Merge pull request #96909 from aanderse/beanstalk

nixos/beanstalkd: add openFirewall option
This commit is contained in:
Aaron Andersen 2020-09-01 13:31:40 -04:00 committed by GitHub
commit fee2b5df41
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -28,6 +28,12 @@ in
example = "0.0.0.0";
};
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = "Whether to open ports in the firewall for the server.";
};
};
};
@ -35,6 +41,10 @@ in
config = mkIf cfg.enable {
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.listen.port ];
};
environment.systemPackages = [ pkg ];
systemd.services.beanstalkd = {