aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/neomutt-accounts.nix
diff options
context:
space:
mode:
authorKaiden Fey <kookie@spacekookie.de>2020-09-21 14:12:32 +0200
committerKatharina Fey <kookie@spacekookie.de>2020-09-21 14:12:32 +0200
commitf80843dd45d7acd563d0a5b014cec3a2ea686fc2 (patch)
tree87189d873d6f932d85f9c1a480462b37d96cd6a5 /home-manager/modules/programs/neomutt-accounts.nix
parente0800985dab8f8ebb4cebdfd7e361fd1fafdb2a7 (diff)
parent9b1b55ba0264a55add4b7b4e022bdc2832b531f6 (diff)
Merge commit '9b1b55ba0264a55add4b7b4e022bdc2832b531f6'
Diffstat (limited to 'home-manager/modules/programs/neomutt-accounts.nix')
-rw-r--r--home-manager/modules/programs/neomutt-accounts.nix18
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);
- };
}