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/ports.nix | 1 + nix/hosts/corrino/www/stats.emile.space.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 nix/hosts/corrino/www/stats.emile.space.nix (limited to 'nix') diff --git a/nix/hosts/corrino/ports.nix b/nix/hosts/corrino/ports.nix index b83b118..10ae593 100644 --- a/nix/hosts/corrino/ports.nix +++ b/nix/hosts/corrino/ports.nix @@ -23,6 +23,7 @@ netbox = 8001; restic = 8002; nocodb = 8003; + goatcounter = 8004; r2wars-web = 8089; ctf = 8338; magic-hash = 8339; 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