diff options
Diffstat (limited to 'home-manager/modules/programs/neomutt-accounts.nix')
-rw-r--r-- | home-manager/modules/programs/neomutt-accounts.nix | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/home-manager/modules/programs/neomutt-accounts.nix b/home-manager/modules/programs/neomutt-accounts.nix index 033db38eb0a..009cf1fa7e8 100644 --- a/home-manager/modules/programs/neomutt-accounts.nix +++ b/home-manager/modules/programs/neomutt-accounts.nix @@ -8,7 +8,16 @@ with lib; sendMailCommand = mkOption { type = types.nullOr types.str; - default = null; + default = if config.msmtp.enable then + "msmtpq --read-envelope-from --read-recipients" + else + null; + defaultText = literalExample '' + if config.msmtp.enable then + "msmtpq --read-envelope-from --read-recipients" + else + null + ''; example = "msmtpq --read-envelope-from --read-recipients"; description = '' Command to send a mail. If not set, neomutt will be in charge of sending mails. @@ -24,11 +33,4 @@ with lib; ''; }; }; - - config = mkIf config.neomutt.enable { - neomutt.sendMailCommand = mkOptionDefault (if config.msmtp.enable then - "msmtpq --read-envelope-from --read-recipients" - else - null); - }; } |