summaryrefslogtreecommitdiffstats
path: root/makefu/2configs/home-manager/mail.nix
blob: ce7ae4f4d2134b7ce6bb8baad192530b7ac97e8f (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  home-manager.users.makefu = {
    accounts.email.accounts.syntaxfehler = {
      address = "felix.richter@syntax-fehler.de";
      userName = "Felix.Richter@syntax-fehler.de";
      imap = {
        host = "syntax-fehler.de";
        tls = {
          enable = true;
        };
      };
      smtp = {
        host = "syntax-fehler.de";
        tls = {
          enable = true;
        };
      };
      msmtp.enable = true;
      notmuch.enable = true;
      offlineimap = {
        enable = true;
        postSyncHookCommand = "notmuch new";
        extraConfig.remote = {
          holdconnectionopen = true;
          idlefolders = "['INBOX']";
        };
      };
      primary = true;
      realName = "Felix Richter";
      passwordCommand = "gpg --use-agent --quiet --batch -d /home/makefu/.mail/syntax-fehler.gpg";
    };
    programs.offlineimap.enable = true;
    programs.offlineimap.extraConfig = {
      mbnames = {
        filename = "~/.mutt/muttrc.mailboxes";
        header = "'mailboxes '";
        peritem = "'+%(accountname)s/%(foldername)s'";
        sep = "' '";
        footer = "'\\n'";
      };
      general = {
        ui = "TTY.TTYUI";
      };
    };
  };
}