aboutsummaryrefslogtreecommitdiffstats
path: root/modules/private/email.example.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/email.example.nix')
-rw-r--r--modules/private/email.example.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/modules/private/email.example.nix b/modules/private/email.example.nix
new file mode 100644
index 0000000..ae3b475
--- /dev/null
+++ b/modules/private/email.example.nix
@@ -0,0 +1,43 @@
+{ config, ... }:
+
+let
+ mailDir = "${config.home.homeDirectory}/.local/mail";
+in
+{
+ accounts.email.accounts = {
+ "example" = {
+ realName = "Example User";
+ address = "user@example.com";
+ userName = "user@example.com";
+ passwordCommand = "${config.programs.gopass.package}/bin/gopass show -o mail/example";
+ flavor = "gmail.com";
+
+ mbsync = {
+ enable = true;
+ createMailbox = true;
+ extraConfig.channel = {
+ Patterns = "*";
+ SyncState = "*";
+ };
+ };
+
+ notmuch.enable = true;
+
+ mu.enable = false;
+ msmtp.enable = false;
+ imapnotify.enable = false;
+ };
+ };
+
+ # Mbsync config
+ programs.mbsync = {
+ enable = true;
+ directory = mailDir;
+ };
+
+ # Notmuch config
+ programs.notmuch = {
+ enable = true;
+ database.path = "${mailDir}/.notmuch";
+ };
+}