From 77becc9d521490a71560fa87ee33e4f600839cfd Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Wed, 30 Sep 2026 03:09:58 +0530 Subject: feat(communication/neomutt): reworked the email syncing Now we have the ability to map each folder on the remote server with a folder with an arbitrary name in the local server. Each folder gets its own channel with quick and full variations where the quick only download the new emails from the remote to the local and full makes a sync both ways. --- .../neomutt/account/flavors/gmail/.neomuttrc | 2 +- .../neomutt/account/flavors/gmail/default.nix | 28 +++++++++++----------- 2 files changed, 15 insertions(+), 15 deletions(-) (limited to 'modules/communication/neomutt/account/flavors') diff --git a/modules/communication/neomutt/account/flavors/gmail/.neomuttrc b/modules/communication/neomutt/account/flavors/gmail/.neomuttrc index c87bba0..2106b65 100644 --- a/modules/communication/neomutt/account/flavors/gmail/.neomuttrc +++ b/modules/communication/neomutt/account/flavors/gmail/.neomuttrc @@ -1,2 +1,2 @@ -mailboxes =Inbox ="[Gmail]/Drafts" ="[Gmail]/Sent Mail" ="[Gmail]/Spam" ="[Gmail]/Trash" +mailboxes =inbox =drafts =sent =spam =trash unset record diff --git a/modules/communication/neomutt/account/flavors/gmail/default.nix b/modules/communication/neomutt/account/flavors/gmail/default.nix index b0b7733..ea696b2 100644 --- a/modules/communication/neomutt/account/flavors/gmail/default.nix +++ b/modules/communication/neomutt/account/flavors/gmail/default.nix @@ -8,25 +8,25 @@ { config = lib.mkIf (config.flavor == "gmail.com") { folders = { - inbox = lib.mkDefault "Inbox"; - drafts = lib.mkDefault "[Gmail]/Drafts"; - sent = lib.mkDefault "[Gmail]/Sent Mail"; - trash = lib.mkDefault "[Gmail]/Trash"; + inbox = lib.mkDefault "inbox"; + drafts = lib.mkDefault "drafts"; + sent = lib.mkDefault "sent"; + trash = lib.mkDefault "trash"; }; mbsync = { create = lib.mkDefault "maildir"; - patterns = lib.mkDefault [ - "INBOX" - "[Gmail]/Drafts" - "[Gmail]/Sent Mail" - "[Gmail]/Spam" - ]; + patterns = lib.mkDefault [ "INBOX" ]; + folders.map = lib.mkDefault { + inbox = "INBOX"; + drafts = "[Gmail]/Drafts"; + sent = "[Gmail]/Sent Mail"; + spam = "[Gmail]/Spam"; + trash = "[Gmail]/Trash"; + }; extraConfig.channel = { Sync = lib.mkDefault "All"; CopyArrivalDate = lib.mkDefault "yes"; - Expunge = lib.mkDefault "Both"; - SyncState = lib.mkDefault "*"; }; }; @@ -34,8 +34,8 @@ notmuch.neomutt.virtual-mailboxes = lib.mkDefault [ { - name = "All Mail"; - query = "folder:${name}/Inbox or folder:\"${name}/[Gmail]/Sent Mail\""; + name = "all"; + query = "folder:${name}/inbox or folder:\"${name}/sent\""; } ]; }; -- cgit v1.2.3