nix-config/home/mail/default.nix

32 lines
553 B
Nix
Raw Normal View History

{ 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
{
imports = [
./accounts.nix
./himalaya.nix
2021-05-22 16:09:11 +02:00
./msmtp.nix
];
2021-05-22 16:09:11 +02:00
options.my.home.mail = with lib; {
enable = my.mkDisableOption "email configuration";
himalaya = {
enable = mkRelatedOption "himalaya configuration";
};
2021-05-22 16:09:11 +02:00
msmtp = {
enable = mkRelatedOption "msmtp configuration";
};
};
config = {
accounts.email = {
maildirBasePath = "mail";
};
};
}