Merge pull request #103182 from pacien/ssmtp-assert-usestarttls-usetls

nixos/ssmtp: add assertion for useSTARTTLS dependency on useTLS
This commit is contained in:
Maximilian Bosch 2020-11-11 10:51:00 +01:00 committed by GitHub
commit a805b2ea32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,6 +142,13 @@ in
config = mkIf cfg.enable {
assertions = [
{
assertion = cfg.useSTARTTLS -> cfg.useTLS;
message = "services.ssmtp.useSTARTTLS has no effect without services.ssmtp.useTLS";
}
];
services.ssmtp.settings = mkMerge [
({
MailHub = cfg.hostName;