infrastructure/config/users/kat/personal/email.nix
2021-09-04 18:27:21 +01:00

47 lines
1.2 KiB
Nix

{ config, lib, pkgs, ... }:
{
config = {
programs = {
notmuch = {
enable = true;
hooks = { preNew = "mbsync --all"; };
};
mbsync.enable = true;
msmtp.enable = true;
vim.plugins = [ pkgs.vimPlugins.notmuch-vim ];
neovim.plugins = [ pkgs.vimPlugins.notmuch-vim ];
};
services.imapnotify.enable = true;
accounts.email = {
maildirBasePath = "${config.home.homeDirectory}/mail";
accounts.kat = {
address = "kat@kittywit.ch";
primary = true;
realName = "kat witch";
userName = "kat@kittywit.ch";
msmtp.enable = true;
mbsync = {
enable = true;
create = "maildir";
};
notmuch.enable = true;
imapnotify = {
enable = true;
boxes = [ "Inbox" ];
onNotifyPost = "${pkgs.notmuch}/bin/notmuch new && ${pkgs.libnotify}/bin/notify-send 'New mail arrived'";
};
imap.host = "athame.kittywit.ch";
smtp.host = "athame.kittywit.ch";
passwordCommand = "bitw get services/email/kittywitch -f password";
gpg = {
signByDefault = true;
key = "01F50A29D4AA91175A11BDB17248991EFA8EFBEE";
};
};
};
};
}