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, ... }: {
|
mailAccount = types.submodule ({ name, config, ... }: {
|
||||||
options = {
|
options = {
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
|
@ -144,7 +141,7 @@ let
|
||||||
};
|
};
|
||||||
|
|
||||||
flavor = mkOption {
|
flavor = mkOption {
|
||||||
type = types.enum [ "plain" "runbox.com" ];
|
type = types.enum [ "plain" "runbox.com" "gmail"];
|
||||||
default = "plain";
|
default = "plain";
|
||||||
description = ''
|
description = ''
|
||||||
Some email providers have peculiar behavior that require
|
Some email providers have peculiar behavior that require
|
||||||
|
@ -262,6 +259,21 @@ let
|
||||||
maildir = mkOptionDefault { path = "${name}"; };
|
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") {
|
(mkIf (config.flavor == "runbox.com") {
|
||||||
imap = {
|
imap = {
|
||||||
host = "mail.runbox.com";
|
host = "mail.runbox.com";
|
||||||
|
|
Loading…
Reference in a new issue