forked from Drift/pvv-nixos-config
overlays/nginx-test
just start replacing shit, we're not even testing the actual config now This sucks nginx should make a proper validation tool that doesnt do DNS request on every hostname mentioned in the config file. Not to mention trying to actually listen on the ip-address and port Why?? Why is TEST failing because it can't bind to the SAME address nginx is probably in production listening on already??
This commit is contained in:
parent
45eea1a791
commit
0a3d1e3696
|
@ -1,5 +1,6 @@
|
|||
acme-certs: final: prev:
|
||||
let
|
||||
problematicHosts = [ "matrix.pvv.ntnu.no" "tom.pvv.ntnu.no" ];
|
||||
lib = final.lib;
|
||||
crt = "${final.path}/nixos/tests/common/acme/server/acme.test.cert.pem";
|
||||
key = "${final.path}/nixos/tests/common/acme/server/acme.test.key.pem";
|
||||
|
@ -9,7 +10,10 @@ acme-certs: final: prev:
|
|||
nginxConfig = prev.writers.writeNginxConfig name text;
|
||||
nativeBuildInputs = [ final.bubblewrap ];
|
||||
} ''
|
||||
ln -s "$nginxConfig" "$out"
|
||||
cat "$nginxConfig" > "$out"
|
||||
substituteInPlace "$out" ${lib.concatMapStrings (host: "--replace ${host} \"localhost\" ") problematicHosts}
|
||||
substituteInPlace "$out" --replace ":443" ":4443"
|
||||
substituteInPlace "$out" --replace ":80" ":8808"
|
||||
set +o pipefail
|
||||
bwrap \
|
||||
--ro-bind "${crt}" "/etc/certs/nginx.crt" \
|
||||
|
|
Loading…
Reference in New Issue