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