From 044ea51034df7567fa1e842984b31d848d9ae05b Mon Sep 17 00:00:00 2001 From: ChUrl Date: Mon, 31 Oct 2022 15:49:44 +0100 Subject: [PATCH] initiali email module (urpost) --- home/modules/email.nix | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 home/modules/email.nix diff --git a/home/modules/email.nix b/home/modules/email.nix new file mode 100644 index 00000000..e8a20a01 --- /dev/null +++ b/home/modules/email.nix @@ -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; + }; + }; + }; +}