mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
accounts.mail: add "gmail.com" as a flavor
To help with some autoconfiguration.
This commit is contained in:
parent
34133ca7f3
commit
168d546304
1 changed files with 14 additions and 4 deletions
|
@ -121,9 +121,6 @@ let
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
# gpgModule = types.submodule {
|
|
||||||
# };
|
|
||||||
|
|
||||||
mailAccountOpts = { name, config, ... }: {
|
mailAccountOpts = { name, config, ... }: {
|
||||||
options = {
|
options = {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
|
@ -145,7 +142,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
flavor = mkOption {
|
flavor = mkOption {
|
||||||
type = types.enum [ "plain" "runbox.com" ];
|
type = types.enum [ "plain" "gmail.com" "runbox.com" ];
|
||||||
default = "plain";
|
default = "plain";
|
||||||
description = ''
|
description = ''
|
||||||
Some email providers have peculiar behavior that require
|
Some email providers have peculiar behavior that require
|
||||||
|
@ -263,6 +260,19 @@ let
|
||||||
maildir = mkOptionDefault { path = "${name}"; };
|
maildir = mkOptionDefault { path = "${name}"; };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(mkIf (config.flavor == "gmail.com") {
|
||||||
|
userName = mkDefault config.address;
|
||||||
|
|
||||||
|
imap = {
|
||||||
|
host = "imap.gmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
smtp = {
|
||||||
|
host = "smtp.gmail.com";
|
||||||
|
port = 587;
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
(mkIf (config.flavor == "runbox.com") {
|
(mkIf (config.flavor == "runbox.com") {
|
||||||
imap = {
|
imap = {
|
||||||
host = "mail.runbox.com";
|
host = "mail.runbox.com";
|
||||||
|
|
Loading…
Reference in a new issue