aboutsummaryrefslogtreecommitdiffstats
path: root/modules/communication/email/default.nix
blob: 3a57cf0d6e204a6648c3a604aad257a603f8c8f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# email - Mbsync and notmuch mail synchronization
{
  config,
  lib,
  ...
}:

let
  mailDir = "${config.home.homeDirectory}/.local/share/mail";
in
{
  options.programs.email = {
    enable = lib.mkEnableOption "Email suite (mbsync + notmuch)";
  };

  config = lib.mkIf config.programs.email.enable {
    programs.mbsync.enable = true;
    programs.notmuch.enable = true;

    accounts.email.maildirBasePath = mailDir;

    home.sessionVariables.MAILDIR = mailDir;
  };
}