From 473d9acdadc2969ba2b5c1c55b440fdda5d213e5 Mon Sep 17 00:00:00 2001 From: Charlotte Van Petegem Date: Fri, 9 Oct 2020 20:55:35 +0200 Subject: [PATCH] neomutt: fix duplicated extraConfig in account (#1546) The `accounts.email.accounts..neomutt.extraConfig` option is included twice in the resulting config file for the account. One time as part of the `mraSection`, one time as part of `accountStr` (`accountStr` includes the `mraSection`). This removes that duplication. I opted to keep the one in `accounStr`, since `extraConfig` doesn't necessarily have anything to do with the `mraSection`. --- modules/programs/neomutt.nix | 2 +- tests/modules/programs/neomutt/hm-example.com-expected | 2 -- .../modules/programs/neomutt/hm-example.com-msmtp-expected.conf | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/modules/programs/neomutt.nix b/modules/programs/neomutt.nix index f2a6bbfff..d990f02ea 100644 --- a/modules/programs/neomutt.nix +++ b/modules/programs/neomutt.nix @@ -124,7 +124,7 @@ let let folderHook = mapAttrsToList setOption (genCommonFolderHooks account // { folder = "'${account.maildir.absPath}'"; - }) ++ optional (neomutt.extraConfig != "") neomutt.extraConfig; + }); in '' ${concatStringsSep "\n" folderHook} ''; diff --git a/tests/modules/programs/neomutt/hm-example.com-expected b/tests/modules/programs/neomutt/hm-example.com-expected index 430509c36..fceae5dc1 100644 --- a/tests/modules/programs/neomutt/hm-example.com-expected +++ b/tests/modules/programs/neomutt/hm-example.com-expected @@ -25,8 +25,6 @@ set realname='H. M. Test' set record='+Sent' set spoolfile='+Inbox' set trash='+Trash' -color status cyan default - # Extra configuration diff --git a/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf b/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf index 1850620f3..925c70636 100644 --- a/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf +++ b/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf @@ -24,8 +24,6 @@ set realname='H. M. Test' set record='+Sent' set spoolfile='+Inbox' set trash='+Trash' -color status cyan default - # Extra configuration