From f7a37ad0b6a3ed256a3d9d36fd78918989427244 Mon Sep 17 00:00:00 2001 From: Jack McCown Date: Sat, 13 Nov 2021 18:07:23 -0500 Subject: [PATCH] email: add fastmail.com email flavor (#2457) --- modules/accounts/email.nix | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix index a06a1d28..e48024e0 100644 --- a/modules/accounts/email.nix +++ b/modules/accounts/email.nix @@ -188,7 +188,7 @@ let }; flavor = mkOption { - type = types.enum [ "plain" "gmail.com" "runbox.com" ]; + type = types.enum [ "plain" "gmail.com" "runbox.com" "fastmail.com" ]; default = "plain"; description = '' Some email providers have peculiar behavior that require @@ -328,7 +328,17 @@ let name = name; maildir = mkOptionDefault { path = "${name}"; }; } - + (mkIf (config.flavor == "fastmail.com") { + userName = mkDefault config.address; + smtp = { + host = "smtp.fastmail.com"; + port = if config.smtp.tls.useStartTls then 587 else 465; + }; + imap = { + host = "imap.fastmail.com"; + port = 993; + }; + }) (mkIf (config.flavor == "gmail.com") { userName = mkDefault config.address;