2021-05-22 16:04:46 +02:00
|
|
|
{ config, lib, ... }:
|
2021-05-22 16:09:11 +02:00
|
|
|
let
|
|
|
|
cfg = config.my.home.mail;
|
|
|
|
|
|
|
|
mkRelatedOption = desc: lib.mkEnableOption desc // { default = cfg.enable; };
|
|
|
|
in
|
2021-05-22 16:04:46 +02:00
|
|
|
{
|
|
|
|
imports = [
|
2021-09-25 15:28:45 +02:00
|
|
|
./accounts
|
|
|
|
./himalaya
|
|
|
|
./msmtp
|
2021-05-22 16:04:46 +02:00
|
|
|
];
|
|
|
|
|
2021-05-22 16:09:11 +02:00
|
|
|
options.my.home.mail = with lib; {
|
|
|
|
enable = my.mkDisableOption "email configuration";
|
|
|
|
|
2021-06-22 17:59:47 +02:00
|
|
|
himalaya = {
|
2022-12-16 12:52:27 +01:00
|
|
|
enable = mkEnableOption "himalaya configuration";
|
2021-06-22 17:59:47 +02:00
|
|
|
};
|
|
|
|
|
2021-05-22 16:09:11 +02:00
|
|
|
msmtp = {
|
|
|
|
enable = mkRelatedOption "msmtp configuration";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-05-22 16:04:46 +02:00
|
|
|
config = {
|
|
|
|
accounts.email = {
|
|
|
|
maildirBasePath = "mail";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|