diff --git a/modules/programs/neomutt.nix b/modules/programs/neomutt.nix index 562763bd..b3e92818 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 6c96f61f..74fbf6b1 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 f7763dbe..8c5c1043 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 d2e2f3ee..8ccd3629 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 03ea3b31..22fcf788 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