Commit c51e7b78 authored by Aaron Andersen's avatar Aaron Andersen
Browse files

nixos/beanstalkd: add openFirewall option

parent 4b5a5b58
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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 = {