summaryrefslogtreecommitdiff
path: root/lib/email.nix
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2019-08-27 14:34:49 -0700
committerBen Sima <ben@bsima.me>2019-08-27 14:34:49 -0700
commitf3b91d75d2d3153e9fa4d7414929dcc531779727 (patch)
treec49dc426b64cec2d47dc594a1a5398244ccc4dd0 /lib/email.nix
parent8c810428d6d93ba718df7e8388615ad7fa3d092c (diff)
reorganize, and some small fixes
Diffstat (limited to 'lib/email.nix')
-rw-r--r--lib/email.nix124
1 files changed, 124 insertions, 0 deletions
diff --git a/lib/email.nix b/lib/email.nix
new file mode 100644
index 0000000..811d739
--- /dev/null
+++ b/lib/email.nix
@@ -0,0 +1,124 @@
+{ pkgs, ... }:
+
+let
+ gpgid = "D09299626FA78AF8";
+in
+{
+ accounts = {
+ email = {
+ maildirBasePath = "\$HOME/Mail";
+ accounts = {
+ "ben@bsima.me" = {
+ primary = true;
+ realName = "Ben Sima";
+ address = "ben@bsima.me";
+ userName = "ben@simatime.com";
+ alot.sendMailCommand = "\$HOME/bin/sendmail";
+ folders = {
+ inbox = "INBOX";
+ };
+ imap = {
+ host = "simatime.com";
+ port = 993;
+ };
+ smtp = {
+ host = "simatime.com";
+ port = 587;
+ tls = {
+ enable = true;
+ useStartTls = true;
+ };
+ };
+ gpg = {
+ key = gpgid;
+ signByDefault = true;
+ encryptByDefault = false;
+ };
+ mbsync = {
+ enable = true;
+ create = "both";
+ expunge = "none";
+ };
+ notmuch.enable = true;
+ msmtp.enable = true;
+ passwordCommand = "cat ~/keybase/private/bsima/ben@bsima.me";
+ };
+
+ "ben@simatime.com" = {
+ realName = "Ben Sima";
+ address = "ben@simatime.com";
+ userName = "ben@simatime.com";
+ imap = {
+ host = "simatime.com";
+ port = 993;
+ };
+ smtp = {
+ host = "simatime.com";
+ port = 587;
+ tls = {
+ enable = true;
+ useStartTls = true;
+ };
+
+ };
+ mbsync = {
+ enable = true;
+ create = "both";
+ expunge = "none";
+ };
+ notmuch.enable = true;
+ passwordCommand = "cat ~/keybase/private/bsima/ben@simatime.com";
+ msmtp.enable = true;
+ };
+
+ #"ben.sima@heroprojects.io" = {
+ # flavor = "gmail.com";
+ # realName = "Ben Sima";
+ # address = "ben.sima@heroprojects.io";
+ # userName = "ben.sima@heroprojects.io";
+ # mbsync = {
+ # enable = true;
+ # create = "both";
+ # expunge = "none";
+ # };
+ # notmuch.enable = true;
+ # msmtp.enable = true;
+ # passwordCommand = "pass work/hero/gmail";
+ #};
+ };
+ };
+ };
+
+ programs = {
+ notmuch = {
+ enable = true;
+ new.tags = [ "new" ];
+ hooks = {};
+ extraConfig = {
+ search = {
+ exclude_tags = "deleted;spam;";
+ };
+ };
+ };
+
+ afew = {
+ enable = true;
+ extraConfig = builtins.readFile ./afew.ini;
+ };
+
+ alot = {
+ enable = true;
+ extraConfig = ''
+ theme = solarized_light
+ '';
+ };
+
+ mbsync = {
+ enable = true;
+ };
+
+ msmtp = {
+ enable = true;
+ };
+ };
+}