aboutsummaryrefslogtreecommitdiff
path: root/nix/modules/home/mbsync.nix
blob: e509c2715d74ebe9d02be25cd033c03cdffc07c3 (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
{ lib, config, ... }:
{
  enable = lib.mkDefault config.profiles.home.email.enable;
  extraConfig = ''
      IMAPAccount ret2pop
      Host ${config.profiles.home.email.imapsServer}
      User ${config.profiles.email.email}
      PassCmd "cat ${config.sops.secrets.mail.path}"
      Port 993
      TLSType IMAPS
      AuthMechs *
      CertificateFile /etc/ssl/certs/ca-certificates.crt

      IMAPStore ret2pop-remote
      Account ret2pop

      MaildirStore ret2pop-local
      Path ~/email/ret2pop/
      Inbox ~/email/ret2pop/INBOX
      SubFolders Verbatim

      Channel ret2pop 
      Far :ret2pop-remote:
      Near :ret2pop-local:
      Patterns *
      Create Near
      Sync All
      Expunge None
      SyncState *
    '';
}