aerc: add notmuch integration
Currently enabling aerc in accounts.email.accounts.<account> doesn't handle existing configs where accounts.email.accounts.<account>.notmuch.enable is set to true. This pr proposes to automatically set notmuch as backend for aerc if this is the case, see rjarry/aerc@master/doc/aerc-notmuch.5.scd. For set-ups where accounts.email.notmuch.enable has been enabled this was previously ignored, so this is probably a breaking change for these configs, but from running this set up during the last weeks I would consider the upside of better search and filtering performance as significantly larger than the minor changes in query handling as noted here rjarry/aerc@master/doc/aerc-notmuch.5.scd#usage.
This commit is contained in:
parent
4a8e31396a
commit
769e07ef8f
1 changed files with 8 additions and 1 deletions
|
|
@ -175,6 +175,11 @@ in
|
|||
"";
|
||||
|
||||
mkConfig = {
|
||||
notmuch = cfg: {
|
||||
source = "notmuch://${config.accounts.email.maildirBasePath}";
|
||||
maildir-store = "${config.accounts.email.maildirBasePath}";
|
||||
maildir-account-path = "${cfg.maildir.path}";
|
||||
};
|
||||
maildir = cfg: {
|
||||
source = "maildir://${config.accounts.email.maildirBasePath}/${cfg.maildir.path}";
|
||||
};
|
||||
|
|
@ -260,7 +265,9 @@ in
|
|||
|
||||
sourceCfg =
|
||||
account:
|
||||
if
|
||||
if account.notmuch.enable then
|
||||
mkConfig.notmuch account
|
||||
else if
|
||||
account.mbsync.enable && account.mbsync.flatten == null && account.mbsync.subFolders == "Maildir++"
|
||||
then
|
||||
mkConfig.maildirpp account
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue