diff options
author | Felix Buehler | 2024-08-24 22:05:34 +0200 |
---|---|---|
committer | Felix Buehler | 2024-08-30 22:59:26 +0200 |
commit | 0d8ce0d47c98672a5783fb5cf5dc2c716147db8c (patch) | |
tree | d5f9e551f5d49284871066f43c62295727e6aa7f /nixos | |
parent | b75b87803a65f1ba33e36c5299198fdb140edea0 (diff) |
nixos/services.mailhog: remove `with lib;`
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/services/mail/mailhog.nix | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/nixos/modules/services/mail/mailhog.nix b/nixos/modules/services/mail/mailhog.nix index 455e5095495e..93400167a209 100644 --- a/nixos/modules/services/mail/mailhog.nix +++ b/nixos/modules/services/mail/mailhog.nix @@ -1,7 +1,4 @@ { config, lib, pkgs, ... }: - -with lib; - let cfg = config.services.mailhog; @@ -21,40 +18,40 @@ in ###### interface imports = [ - (mkRemovedOptionModule [ "services" "mailhog" "user" ] "") + (lib.mkRemovedOptionModule [ "services" "mailhog" "user" ] "") ]; options = { services.mailhog = { - enable = mkEnableOption "MailHog, web and API based SMTP testing"; + enable = lib.mkEnableOption "MailHog, web and API based SMTP testing"; - storage = mkOption { - type = types.enum [ "maildir" "memory" ]; + storage = lib.mkOption { + type = lib.types.enum [ "maildir" "memory" ]; default = "memory"; description = "Store mails on disk or in memory."; }; - apiPort = mkOption { - type = types.port; + apiPort = lib.mkOption { + type = lib.types.port; default = 8025; description = "Port on which the API endpoint will listen."; }; - smtpPort = mkOption { - type = types.port; + smtpPort = lib.mkOption { + type = lib.types.port; default = 1025; description = "Port on which the SMTP endpoint will listen."; }; - uiPort = mkOption { - type = types.port; + uiPort = lib.mkOption { + type = lib.types.port; default = 8025; description = "Port on which the HTTP UI will listen."; }; - extraArgs = mkOption { - type = types.listOf types.str; + extraArgs = lib.mkOption { + type = lib.types.listOf lib.types.str; default = []; description = "List of additional arguments to pass to the MailHog process."; }; @@ -64,7 +61,7 @@ in ###### implementation - config = mkIf cfg.enable { + config = lib.mkIf cfg.enable { systemd.services.mailhog = { description = "MailHog - Web and API based SMTP testing"; |