2018-08-06 12:02:49 +02:00
|
|
|
{ config, lib, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
|
|
|
options.msmtp = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = ''
|
|
|
|
Whether to enable msmtp.
|
|
|
|
</para><para>
|
|
|
|
If enabled then it is possible to use the
|
2019-02-17 23:25:42 +01:00
|
|
|
<parameter class="command">--account</parameter> command line
|
|
|
|
option to send a message for a given account using the
|
|
|
|
<command>msmtp</command> or <command>msmtpq</command> tool.
|
|
|
|
For example, <command>msmtp --account=private</command> would
|
|
|
|
send using the account defined in
|
2018-08-06 12:02:49 +02:00
|
|
|
<option>accounts.email.accounts.private</option>. If the
|
2019-02-17 23:25:42 +01:00
|
|
|
<parameter class="command">--account</parameter> option is not
|
|
|
|
given then the primary account will be used.
|
2018-08-06 12:02:49 +02:00
|
|
|
'';
|
|
|
|
};
|
2018-12-12 14:28:33 +01:00
|
|
|
|
2019-08-07 00:32:54 +02:00
|
|
|
tls.fingerprint = mkOption {
|
|
|
|
type = types.nullOr (types.strMatching "([[:alnum:]]{2}\:)+[[:alnum:]]{2}");
|
|
|
|
default = null;
|
|
|
|
example = "my:SH:a2:56:ha:sh";
|
|
|
|
description = ''
|
|
|
|
Fingerprint of a trusted TLS certificate.
|
|
|
|
The fingerprint can be obtained by executing
|
|
|
|
<command>msmtp --serverinfo --tls --tls-certcheck=off</command>.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2018-12-12 14:28:33 +01:00
|
|
|
extraConfig = mkOption {
|
|
|
|
type = types.attrsOf types.str;
|
|
|
|
default = { };
|
|
|
|
example = { auth = "login"; };
|
|
|
|
description = ''
|
|
|
|
Extra configuration options to add to <filename>~/.msmtprc</filename>.
|
|
|
|
See <link xlink:href="https://marlam.de/msmtp/msmtprc.txt"/> for
|
|
|
|
examples.
|
|
|
|
'';
|
|
|
|
};
|
2018-08-06 12:02:49 +02:00
|
|
|
};
|
|
|
|
}
|