feat: analytics server (medama)

This commit is contained in:
Guz
2025-04-04 20:15:47 -03:00
parent 5db75d337f
commit 82940bffd1
2 changed files with 15 additions and 1 deletions

14
capytal/analytics.nix Normal file
View File

@@ -0,0 +1,14 @@
{config, ...}: let
port = config.services.medama.port;
in {
services.medama.enable = true;
services.medama.port = 6010;
services.caddy.virtualHosts.":${toString (port + 1)}" = {
extraConfig = ''
reverse_proxy http://localhost:${toString (port + 2)} {
header_up X-Real-Ip {remote_host}
}
'';
};
}

View File

@@ -1,6 +1,6 @@
{inputs, ...}: {
imports = [
./cloudflare.nix
./analytics.nix
./network.nix
./websites.nix