Skip to content

Commit fd8e691

Browse files
committed
pact-service: Add z3, and allow overriding server location, enableACME and forceSSL
1 parent 918f7ec commit fd8e691

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

pact-server/service.nix

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
hostName,
3+
location,
4+
enableHttps,
35
nginxPort,
46
pactPort,
57
pactDataDir,
@@ -35,6 +37,7 @@ in {pkgs, lib, ...}: {
3537
description = "Pact Server";
3638
after = [ "network.target" ];
3739
wantedBy = [ "multi-user.target" ];
40+
path = [ pkgs.z3 ];
3841

3942
preStart = ''
4043
export PATH=$PATH:${pkgs.coreutils}/bin
@@ -60,10 +63,10 @@ in {pkgs, lib, ...}: {
6063
else [ 22 80 443 nginxPort ];
6164

6265
services.nginx.virtualHosts."${hostName}" = {
63-
enableACME = true;
64-
forceSSL = true;
65-
locations."/" = {
66-
proxyPass = "http://localhost:${toString pactPort}";
66+
enableACME = enableHttps;
67+
forceSSL = enableHttps;
68+
locations."${location}" = {
69+
proxyPass = "http://localhost:${toString pactPort}/";
6770
extraConfig = ''
6871
# Restrict transaction size:
6972
client_max_body_size 1m;

0 commit comments

Comments
 (0)