summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
- '';
- };
}