From ee32d0d0813f9870d89fb7d821633fd8b4a9987a Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Thu, 9 Jul 2026 20:34:00 +0530 Subject: feat: added email configuration with mbsync + notmuch added a private module which will be gitignored and serves to include options that are not meant to be shared --- modules/private/email.example.nix | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 modules/private/email.example.nix (limited to 'modules/private/email.example.nix') 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"; + }; +} -- cgit v1.2.3