From e6bef7bf709ede6076fc5ab77c64e115f2d25bb4 Mon Sep 17 00:00:00 2001 From: k Date: Sun, 10 May 2026 15:47:26 -0400 Subject: [PATCH] Some ratchat tweeks --- hosts/server/service.nix | 41 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/hosts/server/service.nix b/hosts/server/service.nix index ca44f36..b973218 100644 --- a/hosts/server/service.nix +++ b/hosts/server/service.nix @@ -102,6 +102,35 @@ secretKeyFile = "/var/cache-priv-key.pem"; }; +prometheus = { + enable = true; + scrapeConfigs = [{ + job_name = "ratchat-server"; + static_configs = [{ + targets = [ "127.0.0.1:9011" ]; + }]; + }]; +}; + +grafana = { + enable = true; + settings = { + server = { + http_addr = "127.0.0.1"; + http_port = 3000; + }; + }; + + provision = { + enable = true; + datasources.settings.datasources = [{ + name = "Prometheus"; + type = "prometheus"; + url = "http://localhost:9090"; + }]; + }; +}; + ollama = { enable = true; package = pkgs.ollama-vulkan; @@ -243,7 +272,17 @@ }; }; - "mlf.dhilton.xyz" = { + "rat.dhilton.xyz" = { + forceSSL = true; + enableACME = true; + locations."/" = { + proxyPass = "http://127.0.0.1:9011"; +extraConfig = '' + if ($is_allowed_user = 0) { return 401; } + ''; + }; + }; + forceSSL = true; enableACME = true; locations."/" = {