email: allow null certificatesFile

Allow the value of certificatesFile to be null.

Also fixup uses of this variable.

Fixes: #2206
This commit is contained in:
Matthew Leach 2021-08-02 19:23:50 +01:00 committed by Robert Helgesson
parent 2c4234cb79
commit 5515ec99cc
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
5 changed files with 9 additions and 7 deletions

View file

@ -295,7 +295,8 @@ in {
"ssl")
else
"";
smtpSslCertPath = mkIf smtp.tls.enable smtp.tls.certificatesFile;
smtpSslCertPath =
mkIf smtp.tls.enable (toString smtp.tls.certificatesFile);
smtpServer = smtp.host;
smtpUser = userName;
from = address;