1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-20 16:59:47 +01: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 { 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"; default = "plain";
description = '' description = ''
Some email providers have peculiar behavior that require Some email providers have peculiar behavior that require
@ -378,6 +385,41 @@ let
maildir = mkOptionDefault { path = "${name}"; }; 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") { (mkIf (config.flavor == "fastmail.com") {
userName = mkDefault config.address; userName = mkDefault config.address;