From 473abad6b754d53cc885668cef2059e5bf90dc0c Mon Sep 17 00:00:00 2001 From: Emile Date: Tue, 3 Dec 2024 22:01:41 +0100 Subject: (corrino) added goatcounter service --- nix/hosts/corrino/www/stats.emile.space.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 nix/hosts/corrino/www/stats.emile.space.nix (limited to 'nix/hosts/corrino/www/stats.emile.space.nix') 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; + }; +} -- cgit 1.4.1