2023-11-11 00:06:42 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
lib,
|
|
|
|
flake,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
|
2022-08-21 21:56:42 +00:00
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
psCfg = config.pub-solar;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
age.secrets.email_gssws_password = {
|
2023-11-11 00:06:42 +00:00
|
|
|
file = "${flake.self}/secrets/email_gssws_password.age";
|
2022-08-21 21:56:42 +00:00
|
|
|
owner = "hensoko";
|
|
|
|
};
|
|
|
|
|
|
|
|
home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
|
|
|
|
services.imapnotify.enable = true;
|
|
|
|
|
|
|
|
programs.mbsync.enable = true;
|
|
|
|
programs.neomutt.enable = true;
|
|
|
|
|
|
|
|
programs.notmuch = {
|
|
|
|
enable = true;
|
|
|
|
hooks = {
|
|
|
|
preNew = "mbsync --all";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
programs.msmtp.enable = true;
|
|
|
|
|
|
|
|
accounts.email.accounts."gssws" = {
|
|
|
|
primary = true;
|
|
|
|
address = "hensoko@gssws.de";
|
|
|
|
realName = "Hendrik Sokolowski";
|
|
|
|
|
|
|
|
userName = "hensoko";
|
|
|
|
passwordCommand = "cat /run/agenix/email_gssws_password";
|
|
|
|
|
|
|
|
imapnotify.enable = true;
|
|
|
|
imapnotify.onNotify = ''${pkgs.notmuch}/bin/notmuch new && ${pkgs.libnotify}/bin/notify-send "You got mail!" "imapnotify gssws"'';
|
|
|
|
|
|
|
|
mbsync = {
|
|
|
|
enable = true;
|
|
|
|
create = "maildir";
|
|
|
|
extraConfig.channel = {
|
|
|
|
MaxMessages = 50000;
|
|
|
|
MaxSize = "5m";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
msmtp.enable = true;
|
|
|
|
notmuch.enable = true;
|
|
|
|
neomutt.enable = true;
|
|
|
|
|
|
|
|
imap = {
|
|
|
|
host = "mail.gssws.de";
|
|
|
|
port = 993;
|
|
|
|
tls.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
smtp = {
|
|
|
|
host = "mail.gssws.de";
|
|
|
|
port = 465;
|
|
|
|
tls.enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|