1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-23 11:39:46 +01:00

email: add fastmail.com email flavor (#2457)

This commit is contained in:
Jack McCown 2021-11-13 18:07:23 -05:00 committed by GitHub
parent 520adafcb9
commit f7a37ad0b6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,7 +188,7 @@ let
}; };
flavor = mkOption { flavor = mkOption {
type = types.enum [ "plain" "gmail.com" "runbox.com" ]; type = types.enum [ "plain" "gmail.com" "runbox.com" "fastmail.com" ];
default = "plain"; default = "plain";
description = '' description = ''
Some email providers have peculiar behavior that require Some email providers have peculiar behavior that require
@ -328,7 +328,17 @@ let
name = name; name = name;
maildir = mkOptionDefault { path = "${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") { (mkIf (config.flavor == "gmail.com") {
userName = mkDefault config.address; userName = mkDefault config.address;