65 lines
1.4 KiB
Nix
65 lines
1.4 KiB
Nix
|
{ config, pkgs, lib, self, ... }:
|
||
|
with lib;
|
||
|
let
|
||
|
psCfg = config.pub-solar;
|
||
|
in
|
||
|
{
|
||
|
age.secrets.email_gssws_password = {
|
||
|
file = "${self}/secrets/email_gssws_password.age";
|
||
|
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;
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|