diff options
author | stuebinm | 2021-03-09 16:27:23 +0100 |
---|---|---|
committer | stuebinm | 2021-03-09 16:27:23 +0100 |
commit | 393186f9ebf0bf43a1add8bd8d0e37be566ae8cc (patch) | |
tree | 537778c320d46a9ab6b5ee38585b464ab736faa5 | |
parent | baaaa849feeee2403c70cc0141c766c3fe214403 (diff) |
bugfix: recognise ssl is used even when `enableSSL` is not set.
Previously, I had expected that `enableSSL` would be set to true even if
ssl was handled through some other option (e.g. `forceSSL`).
This is apparently not the case, so the module explicitely checks for
other options as well now.
-rw-r--r-- | default.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/default.nix b/default.nix index 0f362dc..7e2a0b5 100644 --- a/default.nix +++ b/default.nix @@ -65,7 +65,7 @@ with lib; virtualHosts.${cfg.frontend.domain} = cfg.frontend.config // { root = # need to do it this (long) way since a user may change this value outside of this module - let ssl = config.services.nginx.virtualHosts.${cfg.frontend.domain}.enableSSL; + let ssl = with config.services.nginx.virtualHosts.${cfg.frontend.domain}; enableSSL || forceSSL || enableACME; in (cfg.frontend.package.override ({ baseurl = (if ssl then "https://" else "http://") + cfg.frontend.domain; } // (if cfg.frontend.proxyBackend then { |