2024-02-13 15:30:26 -05:00
|
|
|
{ config, pkgs, fullname, email, ... }:
|
2024-02-13 15:13:46 -05:00
|
|
|
let
|
2024-02-13 15:30:26 -05:00
|
|
|
maildir = "${config.xdg.dataHome}/mail";
|
|
|
|
pass = config.programs.password-store.package;
|
2024-02-13 15:13:46 -05:00
|
|
|
in {
|
2024-02-13 21:37:27 -05:00
|
|
|
programs = {
|
|
|
|
msmtp.enable = true;
|
|
|
|
mbsync.enable = true;
|
|
|
|
mu.enable = true;
|
|
|
|
};
|
2024-02-13 22:26:36 -05:00
|
|
|
home.packages = [ pkgs.emacsPackages.mu4e ];
|
2024-02-13 21:37:27 -05:00
|
|
|
|
2024-02-13 15:13:46 -05:00
|
|
|
accounts.email = {
|
|
|
|
maildirBasePath = maildir;
|
|
|
|
accounts = {
|
2024-02-13 15:30:26 -05:00
|
|
|
gmail = {
|
2024-02-13 15:13:46 -05:00
|
|
|
address = email;
|
|
|
|
userName = email;
|
|
|
|
flavor = "gmail.com";
|
2024-02-13 21:37:27 -05:00
|
|
|
passwordCommand = "${pass}/bin/pass Email/GmailApp/kiana.a.sheibani@gmail.com";
|
2024-02-13 15:13:46 -05:00
|
|
|
primary = true;
|
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "both";
|
|
|
|
expunge = "both";
|
|
|
|
patterns = [ "*" ];
|
|
|
|
};
|
|
|
|
realName = fullname;
|
|
|
|
msmtp.enable = true;
|
2024-02-13 22:26:36 -05:00
|
|
|
mu.enable = true;
|
2024-02-13 15:13:46 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
preExec = "${pkgs.isync}/bin/mbsync -Ha";
|
|
|
|
postExec = "${pkgs.mu}/bin/mu index -m ${maildir}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|