Default password-file to null

This commit is contained in:
niten 2024-01-17 16:19:14 -08:00
parent 56f2393796
commit e528d17e5e
1 changed files with 3 additions and 1 deletions

View File

@ -64,6 +64,7 @@ in {
password-file = mkOption { password-file = mkOption {
type = nullOr str; type = nullOr str;
description = "Path to file containing SMTP password"; description = "Path to file containing SMTP password";
default = null;
}; };
from-address = mkOption { from-address = mkOption {
@ -106,7 +107,8 @@ in {
inherit (cfg.smtp) host port user; inherit (cfg.smtp) host port user;
fromAddress = cfg.smtp.from-address; fromAddress = cfg.smtp.from-address;
authenticate = !isNull cfg.smtp.password-file; authenticate = !isNull cfg.smtp.password-file;
passwordFile = cfg.smtp.password-file; passwordFile = mkIf (!isNull cfg.smtp.password-file)
cfg.smtp.password-file;
}; };
redis.createLocally = true; redis.createLocally = true;
database.createLocally = true; database.createLocally = true;