2018-08-06 12:05:46 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options.alot = {
|
|
|
|
sendMailCommand = mkOption {
|
|
|
|
type = types.nullOr types.str;
|
|
|
|
description = ''
|
|
|
|
Command to send a mail. If msmtp is enabled for the account,
|
|
|
|
then this is set to
|
|
|
|
<command>msmtpq --read-envelope-from --read-recipients</command>.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
extraConfig = mkOption {
|
|
|
|
type = types.lines;
|
|
|
|
default = "";
|
|
|
|
description = ''
|
|
|
|
Extra settings to add to this Alot account configuration.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.notmuch.enable {
|
|
|
|
alot.sendMailCommand = mkOptionDefault (
|
|
|
|
if config.msmtp.enable
|
2018-11-12 21:59:02 +01:00
|
|
|
then "msmtpq --read-envelope-from --read-recipients"
|
2018-08-06 12:05:46 +02:00
|
|
|
else null
|
|
|
|
);
|
|
|
|
};
|
|
|
|
}
|