diff --git a/nixos/modules/services/misc/beanstalkd.nix b/nixos/modules/services/misc/beanstalkd.nix index b8f163cbfadf..5f7e4be34daa 100644 --- a/nixos/modules/services/misc/beanstalkd.nix +++ b/nixos/modules/services/misc/beanstalkd.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.beanstalkd; pkg = pkgs.beanstalkd; @@ -12,25 +9,25 @@ in options = { services.beanstalkd = { - enable = mkEnableOption "the Beanstalk work queue"; + enable = lib.mkEnableOption "the Beanstalk work queue"; listen = { - port = mkOption { - type = types.port; + port = lib.mkOption { + type = lib.types.port; description = "TCP port that will be used to accept client connections."; default = 11300; }; - address = mkOption { - type = types.str; + address = lib.mkOption { + type = lib.types.str; description = "IP address to listen on."; default = "127.0.0.1"; example = "0.0.0.0"; }; }; - openFirewall = mkOption { - type = types.bool; + openFirewall = lib.mkOption { + type = lib.types.bool; default = false; description = "Whether to open ports in the firewall for the server."; }; @@ -39,9 +36,9 @@ in # implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { - networking.firewall = mkIf cfg.openFirewall { + networking.firewall = lib.mkIf cfg.openFirewall { allowedTCPPorts = [ cfg.listen.port ]; };