From dcfd6941b3ae763398e9333f2b82d0a5863058a9 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Thu, 11 Apr 2024 10:47:49 +0200 Subject: [PATCH] WIP: gitea metrics --- hosts/bekkalokk/services/gitea/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hosts/bekkalokk/services/gitea/default.nix b/hosts/bekkalokk/services/gitea/default.nix index b02d3aa..fb32c5f 100644 --- a/hosts/bekkalokk/services/gitea/default.nix +++ b/hosts/bekkalokk/services/gitea/default.nix @@ -61,6 +61,15 @@ in { client_max_body_size 512M; ''; }; + + locations."/metrics" = { + proxyPass = "http://unix:${cfg.settings.server.HTTP_ADDR}"; + extraConfig = '' + allow ${values.hosts.ildkule.ipv4}; + allow ${values.hosts.ildkule.ipv6}; + deny all; + ''; + }; }; networking.firewall.allowedTCPPorts = [ sshPort ];