From 5ab62b61fb4d47f2740bfcef52d540f95335360e Mon Sep 17 00:00:00 2001 From: Benedikt Rips Date: Mon, 4 Aug 2025 13:12:44 +0200 Subject: [PATCH] accounts.email: add authentication mechanism --- modules/accounts/email.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix index 0d4f4f4d..b6e57561 100644 --- a/modules/accounts/email.nix +++ b/modules/accounts/email.nix @@ -114,6 +114,28 @@ let }; }; + authenticationOption = mkOption { + type = types.nullOr ( + types.either types.str ( + types.enum [ + "anonymous" + "apop" + "clear" + "cram_md5" + "digest_md5" + "gssapi" + "login" + "ntlm" + "plain" + "xoauth2" + ] + ) + ); + default = null; + example = "plain"; + description = "The authentication mechanism."; + }; + imapModule = types.submodule { options = { host = mkOption { @@ -134,6 +156,8 @@ let ''; }; + authentication = authenticationOption; + tls = mkOption { type = tlsModule; default = { }; @@ -194,6 +218,8 @@ let ''; }; + authentication = authenticationOption; + tls = mkOption { type = tlsModule; default = { };