diff --git a/modules/accounts/email.nix b/modules/accounts/email.nix index 6846cadb..e56172a9 100644 --- a/modules/accounts/email.nix +++ b/modules/accounts/email.nix @@ -120,9 +120,6 @@ let }; }); - # gpgModule = types.submodule { - # }; - mailAccount = types.submodule ({ name, config, ... }: { options = { name = mkOption { @@ -144,7 +141,7 @@ let }; flavor = mkOption { - type = types.enum [ "plain" "runbox.com" ]; + type = types.enum [ "plain" "runbox.com" "gmail"]; default = "plain"; description = '' Some email providers have peculiar behavior that require @@ -262,6 +259,21 @@ let maildir = mkOptionDefault { path = "${name}"; }; } + (mkIf (config.flavor == "gmail") { + imap = { + host = "imap.gmail.com"; + }; + + smtp = { + host = "smtp.gmail.com"; + port = 587; + }; + }) + + (mkIf (config.alot.enable) { + notmuch.enable = true; + }) + (mkIf (config.flavor == "runbox.com") { imap = { host = "mail.runbox.com";