From f3b91d75d2d3153e9fa4d7414929dcc531779727 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Tue, 27 Aug 2019 14:34:49 -0700 Subject: reorganize, and some small fixes --- lib/email.nix | 124 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 lib/email.nix (limited to 'lib/email.nix') 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; + }; + }; +} -- cgit v1.2.3