mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 05:29:46 +01:00
msmtp: add account option tls.fingerprint
This commit is contained in:
parent
9302523d34
commit
bce63e4dff
2 changed files with 14 additions and 0 deletions
|
@ -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 {
|
extraConfig = mkOption {
|
||||||
type = types.attrsOf types.str;
|
type = types.attrsOf types.str;
|
||||||
default = { };
|
default = { };
|
||||||
|
|
|
@ -24,6 +24,9 @@ let
|
||||||
tls_starttls = onOff smtp.tls.useStartTls;
|
tls_starttls = onOff smtp.tls.useStartTls;
|
||||||
tls_trust_file = smtp.tls.certificatesFile;
|
tls_trust_file = smtp.tls.certificatesFile;
|
||||||
}
|
}
|
||||||
|
// optionalAttrs (msmtp.tls.fingerprint != null) {
|
||||||
|
tls_fingerprint = msmtp.tls.fingerprint;
|
||||||
|
}
|
||||||
// optionalAttrs (smtp.port != null) {
|
// optionalAttrs (smtp.port != null) {
|
||||||
port = toString smtp.port;
|
port = toString smtp.port;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue