Configure email client
This commit is contained in:
parent
fbbee3a200
commit
d8e0210c30
3 changed files with 43 additions and 4 deletions
37
home-manager/email.nix
Normal file
37
home-manager/email.nix
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
{ pkgs, fullname, email, ... }:
|
||||
let
|
||||
maildir = "/home/kiana/.mail";
|
||||
in {
|
||||
accounts.email = {
|
||||
maildirBasePath = maildir;
|
||||
accounts = {
|
||||
Gmail = {
|
||||
address = email;
|
||||
userName = email;
|
||||
flavor = "gmail.com";
|
||||
primary = true;
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
patterns = [ "*" ];
|
||||
};
|
||||
realName = fullname;
|
||||
msmtp.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
msmtp.enable = true;
|
||||
mbsync.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
mbsync = {
|
||||
enable = true;
|
||||
preExec = "${pkgs.isync}/bin/mbsync -Ha";
|
||||
postExec = "${pkgs.mu}/bin/mu index -m ${maildir}";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue