1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00

msmtp: add account option tls.fingerprint

This commit is contained in:
paumr 2019-08-07 00:32:54 +02:00 committed by Robert Helgesson
parent 9302523d34
commit bce63e4dff
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 14 additions and 0 deletions

View file

@ -22,6 +22,17 @@ with lib;
'';
};
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>.
'';
};
extraConfig = mkOption {
type = types.attrsOf types.str;
default = { };

View file

@ -24,6 +24,9 @@ let
tls_starttls = onOff smtp.tls.useStartTls;
tls_trust_file = smtp.tls.certificatesFile;
}
// optionalAttrs (msmtp.tls.fingerprint != null) {
tls_fingerprint = msmtp.tls.fingerprint;
}
// optionalAttrs (smtp.port != null) {
port = toString smtp.port;
}