summary refs log tree commit diff stats
path: root/user/settings/mail.nix
blob: 3009114c52aa73e058e518802f7d12db713db523 (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
{ config
, lib
, pkgs
, ...
}: {
  home.packages = [
    pkgs.html2text
  ];
  accounts.email = {
    maildirBasePath = "mail";
  };
  programs.mbsync = {
    enable = true;
    extraConfig = ''
      CopyArrivalDate yes
      FSync no
    '';
  };
  services.mbsync = {
    enable = true;
    frequency = "*:6/15";
    postExec = "${config.programs.emacs.finalPackage}/bin/emacsclient -e (mu4e-update-index)";
  };
  systemd.user.timers.mbsync = {
    Timer = {
      OnCalendar = lib.mkForce false;
      OnBootSec = "5min";
      OnUnitActiveSec = "15min";
    };
  };
  programs.msmtp = {
    enable = true;
  };
}