mirror of
https://github.com/nix-community/home-manager
synced 2024-11-10 07:04:17 +00:00
email: add yandex and office365 email flavors
This commit is contained in:
parent
c5b4177bda
commit
ae474885f7
1 changed files with 43 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue