diff options
| author | Mel <mel@rnrd.eu> | 2025-08-22 03:46:33 +0200 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2025-08-22 03:46:33 +0200 |
| commit | 8df556f5552ed05715514c5b61a7226b1f176591 (patch) | |
| tree | ca4179b19e2b1722556a895c69070ec687ce49db | |
| parent | 9e4dc7114f74ed5b86cca8d34cb62b333081a4fe (diff) | |
| download | network-8df556f5552ed05715514c5b61a7226b1f176591.tar.zst network-8df556f5552ed05715514c5b61a7226b1f176591.zip | |
Add goatcounter to mel.gg
Signed-off-by: Mel <mel@rnrd.eu>
| -rw-r--r-- | services/goatcounter.nix | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/services/goatcounter.nix b/services/goatcounter.nix index b463b27..760a958 100644 --- a/services/goatcounter.nix +++ b/services/goatcounter.nix @@ -49,15 +49,34 @@ in ]; }; - services.nginx.virtualHosts."goat.rnrd.eu" = { - useACMEHost = "rnrd.eu"; - forceSSL = true; - locations."/" = { - proxyPass = "http://127.0.0.1:${toString goatcounterLocalPort}/"; - proxyWebsockets = true; + services.nginx.virtualHosts = + let + vhost = + extra: + { + forceSSL = true; + locations."/" = { + proxyPass = "http://127.0.0.1:${toString goatcounterLocalPort}/"; + proxyWebsockets = true; + }; + extraConfig = '' + access_log /var/log/nginx/goat.access.log json_combined; + ''; + } + // extra; + + domain = { + renard = { + useACMEHost = "rnrd.eu"; + }; + + other = { + enableACME = true; + }; + }; + in + { + "goat.rnrd.eu" = vhost domain.renard; + "stats.mel.gg" = vhost domain.other; }; - extraConfig = '' - access_log /var/log/nginx/goat.access.log json_combined; - ''; - }; } |
