From 393186f9ebf0bf43a1add8bd8d0e37be566ae8cc Mon Sep 17 00:00:00 2001 From: stuebinm Date: Tue, 9 Mar 2021 16:27:23 +0100 Subject: 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. --- default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'default.nix') 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 { -- cgit v1.2.3