summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMel <mel@rnrd.eu>2025-08-22 03:46:33 +0200
committerMel <mel@rnrd.eu>2025-08-22 03:46:33 +0200
commit8df556f5552ed05715514c5b61a7226b1f176591 (patch)
treeca4179b19e2b1722556a895c69070ec687ce49db
parent9e4dc7114f74ed5b86cca8d34cb62b333081a4fe (diff)
downloadnetwork-8df556f5552ed05715514c5b61a7226b1f176591.tar.zst
network-8df556f5552ed05715514c5b61a7226b1f176591.zip
Add goatcounter to mel.gg
Signed-off-by: Mel <mel@rnrd.eu>
-rw-r--r--services/goatcounter.nix39
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;
- '';
- };
}