about summary refs log tree commit diff
path: root/nix/hosts/corrino/www
diff options
context:
space:
mode:
Diffstat (limited to 'nix/hosts/corrino/www')
-rw-r--r--nix/hosts/corrino/www/stats.emile.space.nix22
1 files changed, 22 insertions, 0 deletions
diff --git a/nix/hosts/corrino/www/stats.emile.space.nix b/nix/hosts/corrino/www/stats.emile.space.nix
new file mode 100644
index 0000000..056c2ec
--- /dev/null
+++ b/nix/hosts/corrino/www/stats.emile.space.nix
@@ -0,0 +1,22 @@
+{ config, pkgs, ... }:
+
+{
+  services.nginx.virtualHosts."stats.emile.space" = {
+    forceSSL = true;
+    enableACME = true;
+    locations = {
+      "/" = {
+        proxyPass = "http://[::1]:${toString config.services.goatcounter.port}";
+      };
+    };
+  };
+
+  services.goatcounter = {
+    enable = true;
+    package = pkgs.goatcounter;
+
+    proxy = true;
+    address = "[::1]";
+    port = config.emile.ports.goatcounter;
+  };
+}