From 6b5020927fbb0a041f54c2224d4734e97cf78097 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Wed, 15 Jul 2026 21:55:29 +0530 Subject: feat: reworked the structure for communication/neomutt Using neomutt as the module for email instead of just "email" as used previously. "email" was ambigious in that it was too vague on what it was supposed to do with email, now neomutt clearly specifies that we plan to use neomutt as our email client. However mbsync and notmuch are still used under the hood that is not reflected in the module name "neomutt". This is fine as they only serve the purpose of downloading and querying the emails which may be considered a background feature. --- modules/private/email.example.nix | 49 +++------------------------------------ 1 file changed, 3 insertions(+), 46 deletions(-) (limited to 'modules/private') diff --git a/modules/private/email.example.nix b/modules/private/email.example.nix index 1c863cc..adf71c3 100644 --- a/modules/private/email.example.nix +++ b/modules/private/email.example.nix @@ -1,56 +1,13 @@ -{ config, lib, ... }: +{ ... }: { - config.communication.email.accounts = { + config.communication.neomutt.accounts = { "example" = { realName = "Example User"; address = "user@gmail.com"; - userName = "user@gmail.com"; - passwordCommand = "${lib.getExe config.security.gopass.package} -o mail/user@gmail.com"; + passwordGopassSecret = "mail/user@gmail.com"; flavor = "gmail.com"; primary = true; - neomutt = { - enable = true; - mailboxType = "maildir"; - extraConfig = '' - mailboxes =Inbox ="[Gmail]/Drafts" ="[Gmail]/Sent Mail" ="[Gmail]/Spam" ="[Gmail]/Trash" - ''; - }; - - folders = { - inbox = "Inbox"; - drafts = "[Gmail]/Drafts"; - sent = "[Gmail]/Sent Mail"; - trash = "[Gmail]/Trash"; - }; - - mbsync = { - enable = true; - create = "maildir"; - patterns = [ - "INBOX" - "[Gmail]/Drafts" - "[Gmail]/Sent Mail" - "[Gmail]/Spam" - "[Gmail]/Trash" - ]; - extraConfig.channel = { - SyncState = "*"; - Sync = "All"; - CopyArrivalDate = "yes"; - Expunge = "Both"; - }; - }; - - notmuch = { - enable = true; - neomutt.virtualMailboxes = [ - { - name = "All Mail"; - query = "folder:arpitchakladar/Inbox or folder:\"arpitchakladar/[Gmail]/Sent Mail\""; - } - ]; - }; }; }; } -- cgit v1.2.3