diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2020-11-11 10:51:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 10:51:00 +0100 |
commit | a805b2ea32d48d563770485c4d7cf8787edd95a8 (patch) | |
tree | c59be7347f0dafb7e8c79d78b5b46aaa3c0410bf | |
parent | 3b48d217b3db84100572bad055989cf0c3424dea (diff) | |
parent | f7c50a8aa060b38c9b8fa0a40fca6e7049be2652 (diff) |
Merge pull request #103182 from pacien/ssmtp-assert-usestarttls-usetls
nixos/ssmtp: add assertion for useSTARTTLS dependency on useTLS
-rw-r--r-- | nixos/modules/programs/ssmtp.nix | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nixos/modules/programs/ssmtp.nix b/nixos/modules/programs/ssmtp.nix index 98ff21bd37f26..1f49ddc91bb38 100644 --- a/nixos/modules/programs/ssmtp.nix +++ b/nixos/modules/programs/ssmtp.nix @@ -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; |