aboutsummaryrefslogtreecommitdiff
path: root/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/services/misc/beanstalkd.nix')
-rw-r--r--nixpkgs/nixos/modules/services/misc/beanstalkd.nix10
1 files changed, 10 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/services/misc/beanstalkd.nix b/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
index bcd133c9741..1c674a5b23b 100644
--- a/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
+++ b/nixpkgs/nixos/modules/services/misc/beanstalkd.nix
@@ -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 = {