Compare commits
6 commits
f04ec5fbc6
...
bec9e413cb
| Author | SHA1 | Date | |
|---|---|---|---|
| bec9e413cb | |||
| 16c48abe61 | |||
| a2cfd55b3d | |||
| de9eb4b136 | |||
| b63c823577 | |||
| 1d84562078 |
1 changed files with 4 additions and 2 deletions
|
|
@ -93,6 +93,7 @@
|
||||||
|
|
||||||
virtualHosts."${config.services.nginx.domain}" = {
|
virtualHosts."${config.services.nginx.domain}" = {
|
||||||
useACMEHost = "tlater.net";
|
useACMEHost = "tlater.net";
|
||||||
|
forceSSL = true;
|
||||||
enableHSTS = true;
|
enableHSTS = true;
|
||||||
locations."/".return = "200 ok";
|
locations."/".return = "200 ok";
|
||||||
};
|
};
|
||||||
|
|
@ -100,8 +101,8 @@
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
testNginxSSL = pkgs.testers.runNixOSTest {
|
hstsIsSet = pkgs.testers.runNixOSTest {
|
||||||
name = "test-nginx-ssl";
|
name = "hsts-is-set";
|
||||||
|
|
||||||
node.specialArgs = { inherit flake-inputs; };
|
node.specialArgs = { inherit flake-inputs; };
|
||||||
nodes = {
|
nodes = {
|
||||||
|
|
@ -121,6 +122,7 @@
|
||||||
testHost.copy_from_vm("/var/lib/acme/tlater.net/", "certs")
|
testHost.copy_from_vm("/var/lib/acme/tlater.net/", "certs")
|
||||||
client.copy_from_host(f"{testHost.out_dir}/certs", "/certs")
|
client.copy_from_host(f"{testHost.out_dir}/certs", "/certs")
|
||||||
|
|
||||||
|
client.succeed("curl --max-time 10 http://testHost")
|
||||||
res = client.succeed(" ".join([
|
res = client.succeed(" ".join([
|
||||||
"curl",
|
"curl",
|
||||||
"--show-error",
|
"--show-error",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue