accounts: added gmail as a flavor
to help with some autoconfiguration
This commit is contained in:
parent
2cbead00d0
commit
d7e1df96ef
|
@ -120,9 +120,6 @@ let
|
|||
};
|
||||
});
|
||||
|
||||
# gpgModule = types.submodule {
|
||||
# };
|
||||
|
||||
mailAccount = types.submodule ({ name, config, ... }: {
|
||||
options = {
|
||||
name = mkOption {
|
||||
|
@ -144,7 +141,7 @@ let
|
|||
};
|
||||
|
||||
flavor = mkOption {
|
||||
type = types.enum [ "plain" "runbox.com" ];
|
||||
type = types.enum [ "plain" "runbox.com" "gmail"];
|
||||
default = "plain";
|
||||
description = ''
|
||||
Some email providers have peculiar behavior that require
|
||||
|
@ -262,6 +259,21 @@ let
|
|||
maildir = mkOptionDefault { path = "${name}"; };
|
||||
}
|
||||
|
||||
(mkIf (config.flavor == "gmail") {
|
||||
imap = {
|
||||
host = "imap.gmail.com";
|
||||
};
|
||||
|
||||
smtp = {
|
||||
host = "smtp.gmail.com";
|
||||
port = 587;
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (config.alot.enable) {
|
||||
notmuch.enable = true;
|
||||
})
|
||||
|
||||
(mkIf (config.flavor == "runbox.com") {
|
||||
imap = {
|
||||
host = "mail.runbox.com";
|
||||
|
|
Loading…
Reference in a new issue