neomutt: fix sendMailCommand when msmtp is enabled
This resolves the error
The option `accounts.email.accounts.xyz.neomutt.sendMailCommand`
is defined both null and not null, in
`…/home-manager/modules/accounts/email.nix' and
`…/home-manager/modules/accounts/email.nix'.
that would occur previously when both neomutt and msmtp were enabled
for an account.
This commit is contained in:
parent
7a3e2cc063
commit
5be9aa417a
4 changed files with 91 additions and 9 deletions
|
|
@ -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);
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue