From 18767458ee09322d99c8a799c6733dcac6b35683 Mon Sep 17 00:00:00 2001 From: Arpit Chakladar Date: Fri, 18 Sep 2026 03:44:23 +0530 Subject: feat(communication/neomutt): added macros to sync channels --- modules/communication/neomutt/account/default.nix | 1 + modules/communication/neomutt/account/sync-channel.nix | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 modules/communication/neomutt/account/sync-channel.nix diff --git a/modules/communication/neomutt/account/default.nix b/modules/communication/neomutt/account/default.nix index f0b1cb1..6eec24e 100644 --- a/modules/communication/neomutt/account/default.nix +++ b/modules/communication/neomutt/account/default.nix @@ -7,6 +7,7 @@ imports = [ ./options.nix ./flavors/gmail.nix + ./sync-channel.nix ]; } ); diff --git a/modules/communication/neomutt/account/sync-channel.nix b/modules/communication/neomutt/account/sync-channel.nix new file mode 100644 index 0000000..5af7443 --- /dev/null +++ b/modules/communication/neomutt/account/sync-channel.nix @@ -0,0 +1,18 @@ +{ + config, + lib, + name, + ... +}@inputs: +{ + config = lib.mkIf config.enable { + neomutt.extraConfig = + let + mbsyncNames = (import ../lib.nix inputs).mbsyncNamesFromName name; + in + '' + macro index,pager gs "set my_wait_key=$wait_key wait_key=noneomutt-sync ${mbsyncNames.channels.quick}set wait_key=$my_wait_key" + macro index,pager gS "set my_wait_key=$wait_key wait_key=noneomutt-sync ${mbsyncNames.channels.full}set wait_key=$my_wait_key" + ''; + }; +} -- cgit v1.2.3