diff options
| author | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-18 23:26:17 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar@gmail.com> | 2026-09-18 23:26:17 +0530 |
| commit | 6b0161b2639bb49e270754e90f4f8a47311c5198 (patch) | |
| tree | fc0f4a138b311061daad5ddeb6ed50314f1f5a1a /modules/communication/neomutt | |
| parent | 53eac37422f77750adbc801f71b85ab04cf2b7f9 (diff) | |
| download | home-manager-config-6b0161b2639bb49e270754e90f4f8a47311c5198.tar.gz home-manager-config-6b0161b2639bb49e270754e90f4f8a47311c5198.zip | |
chore: projectwide refactoring
- Using more consistent naming conventions across the project. Using java style super
descriptive variable names.
- Removed slop comments in favor of using more descriptive naming conventions.
Diffstat (limited to 'modules/communication/neomutt')
| -rw-r--r-- | modules/communication/neomutt/account/sync-channel.nix | 6 | ||||
| -rw-r--r-- | modules/communication/neomutt/mail/mbsync.nix | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/modules/communication/neomutt/account/sync-channel.nix b/modules/communication/neomutt/account/sync-channel.nix index 5af7443..7e538f2 100644 --- a/modules/communication/neomutt/account/sync-channel.nix +++ b/modules/communication/neomutt/account/sync-channel.nix @@ -4,11 +4,15 @@ name, ... }@inputs: +let + + mbsyncNamesFromName = (import ../lib.nix { inherit lib; }).mbsyncNamesFromName; +in { config = lib.mkIf config.enable { neomutt.extraConfig = let - mbsyncNames = (import ../lib.nix inputs).mbsyncNamesFromName name; + mbsyncNames = mbsyncNamesFromName name; in '' macro index,pager gs "<enter-command>set my_wait_key=$wait_key wait_key=no<enter><sync-mailbox><shell-escape>neomutt-sync ${mbsyncNames.channels.quick}<enter><sync-mailbox><enter-command>set wait_key=$my_wait_key<enter>" diff --git a/modules/communication/neomutt/mail/mbsync.nix b/modules/communication/neomutt/mail/mbsync.nix index 7bc72ce..f586538 100644 --- a/modules/communication/neomutt/mail/mbsync.nix +++ b/modules/communication/neomutt/mail/mbsync.nix @@ -3,8 +3,10 @@ config, lib, ... -}@inputs: +}: let + mbsyncNamesFromName = (import ../lib.nix { inherit lib; }).mbsyncNamesFromName; + mbsyncValue = value: if lib.isList value then @@ -26,7 +28,7 @@ let mbsyncAccount = account: let - mbsyncNames = (import ../lib.nix inputs).mbsyncNamesFromName account.name; + mbsyncNames = mbsyncNamesFromName account.name; in lib.concatStringsSep "\n" [ (mbsyncSection "IMAPAccount ${mbsyncNames.base}" ( @@ -86,9 +88,9 @@ let }) ]; - accounts = lib.filter ( - account: account.enable && account.mbsync.enable - ) lib.attrValues config.accounts.email.accounts; + accounts = lib.filter (account: account.enable && account.mbsync.enable) ( + lib.attrValues config.accounts.email.accounts + ); in { config = lib.mkIf config.communication.neomutt.enable { |
