diff --git a/configuration/nginx/ssl.nix b/configuration/nginx/ssl.nix index 28e98ec..dc2b999 100644 --- a/configuration/nginx/ssl.nix +++ b/configuration/nginx/ssl.nix @@ -93,6 +93,7 @@ virtualHosts."${config.services.nginx.domain}" = { useACMEHost = "tlater.net"; + forceSSL = true; enableHSTS = true; locations."/".return = "200 ok"; }; @@ -100,8 +101,8 @@ }; in { - testNginxSSL = pkgs.testers.runNixOSTest { - name = "test-nginx-ssl"; + hstsIsSet = pkgs.testers.runNixOSTest { + name = "hsts-is-set"; node.specialArgs = { inherit flake-inputs; }; nodes = { @@ -121,6 +122,7 @@ testHost.copy_from_vm("/var/lib/acme/tlater.net/", "certs") client.copy_from_host(f"{testHost.out_dir}/certs", "/certs") + client.succeed("curl --max-time 10 http://testHost") res = client.succeed(" ".join([ "curl", "--show-error",