1

initiali email module (urpost)

This commit is contained in:
2022-10-31 15:49:44 +01:00
parent 8efc391ff7
commit 044ea51034

51
home/modules/email.nix Normal file
View File

@ -0,0 +1,51 @@
{ config, nixosConfig, lib, mylib, pkgs, ... }:
with lib;
with mylib.modules;
let
cfg = config.modules.email;
in {
options.modules.email = {
enable = mkEnableOpt "Email";
};
config = mkIf cfg.enable {
programs = {
mbsync.enable = true;
msmtp.enable = true;
notmuch = {
enable = true;
hooks = {
preNew = "mbsync --all";
};
};
};
accounts.email.accounts = {
urpost = {
address = "tobi@urpost.de";
userName = "tobi@urpost.de";
realName = "Christoph Urlacher";
signatur.showSignature = "none";
imap.host = "mail.zeus08.de";
imap.port = 993;
smtp.host = "mail.zeus08.de";
smtp.port = 465;
passwordCommand = "kwallet-query -f email -r urpost kdewallet";
mbsync = { # Imap
enable = true;
create = "maildir";
};
msmtp.enable = true; # Smtp
notmuch.enable = true;
primary = true;
};
};
};
}