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