diff --git a/modules/programs/neomutt.nix b/modules/programs/neomutt.nix index 562763bdd..b3e928183 100644 --- a/modules/programs/neomutt.nix +++ b/modules/programs/neomutt.nix @@ -223,9 +223,11 @@ let # Extra configuration ${account.neomutt.extraConfig} - '' + optionalString (account.signature.showSignature != "none") '' + '' + (if (account.signature.showSignature == "none") then '' + unset signature + '' else '' set signature = ${pkgs.writeText "signature.txt" account.signature.text} - '' + optionalString account.notmuch.enable (notmuchSection account); + '') + optionalString account.notmuch.enable (notmuchSection account); in { options = { diff --git a/tests/modules/programs/neomutt/hm-example.com-expected b/tests/modules/programs/neomutt/hm-example.com-expected index 6c96f61f4..74fbf6b1a 100644 --- a/tests/modules/programs/neomutt/hm-example.com-expected +++ b/tests/modules/programs/neomutt/hm-example.com-expected @@ -31,6 +31,7 @@ set trash='+Trash' # Extra configuration color status cyan default +unset signature # notmuch section set nm_default_uri = "notmuch:///home/hm-user/Mail" virtual-mailboxes "My INBOX" "notmuch://?query=tag:inbox" diff --git a/tests/modules/programs/neomutt/hm-example.com-gpg-expected.conf b/tests/modules/programs/neomutt/hm-example.com-gpg-expected.conf index f7763dbe6..8c5c10439 100644 --- a/tests/modules/programs/neomutt/hm-example.com-gpg-expected.conf +++ b/tests/modules/programs/neomutt/hm-example.com-gpg-expected.conf @@ -30,3 +30,4 @@ set trash='+Trash' # Extra configuration +unset signature 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 d2e2f3eee..8ccd3629a 100644 --- a/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf +++ b/tests/modules/programs/neomutt/hm-example.com-msmtp-expected.conf @@ -30,3 +30,4 @@ set trash='+Trash' # Extra configuration color status cyan default +unset signature diff --git a/tests/modules/programs/neomutt/hm-example.com-no-folder-change-expected.conf b/tests/modules/programs/neomutt/hm-example.com-no-folder-change-expected.conf index 03ea3b31a..22fcf7884 100644 --- a/tests/modules/programs/neomutt/hm-example.com-no-folder-change-expected.conf +++ b/tests/modules/programs/neomutt/hm-example.com-no-folder-change-expected.conf @@ -28,3 +28,4 @@ set trash='+Trash' # Extra configuration +unset signature