1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 00:18:30 +02:00

email: add yandex and office365 email flavors

This commit is contained in:
Dmitriy Pleshevskiy 2022-08-25 14:36:35 +03:00 committed by Robert Helgesson
parent c5b4177bda
commit ae474885f7
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89

View File

@ -229,7 +229,14 @@ let
};
flavor = mkOption {
type = types.enum [ "plain" "gmail.com" "runbox.com" "fastmail.com" ];
type = types.enum [
"plain"
"gmail.com"
"runbox.com"
"fastmail.com"
"yandex.com"
"outlook.office365.com"
];
default = "plain";
description = ''
Some email providers have peculiar behavior that require
@ -378,6 +385,41 @@ let
maildir = mkOptionDefault { path = "${name}"; };
}
(mkIf (config.flavor == "yandex.com") {
userName = mkDefault config.address;
imap = {
host = "imap.yandex.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp.yandex.com";
port = 465;
tls.enable = true;
};
})
(mkIf (config.flavor == "outlook.office365.com") {
userName = mkDefault config.address;
imap = {
host = "outlook.office365.com";
port = 993;
tls.enable = true;
};
smtp = {
host = "smtp-mail.outlook.com";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
})
(mkIf (config.flavor == "fastmail.com") {
userName = mkDefault config.address;