formating
Some checks failed
Verify Nix Flake / verify_build (push) Failing after 3s

This commit is contained in:
k 2026-05-10 15:50:22 -04:00
parent 5086aba848
commit e183e8310c
2 changed files with 44 additions and 38 deletions

View file

@ -35,7 +35,7 @@
rodant = { rodant = {
isNormalUser = true; isNormalUser = true;
description = "llm user"; description = "llm user";
packages = with pkgs; [git python3 nodejs cargo ripgrep curl wget ffmpeg imagemagick texliveFull ]; packages = with pkgs; [git python3 nodejs cargo ripgrep curl wget ffmpeg imagemagick texliveFull];
}; };
k = { k = {
isNormalUser = true; isNormalUser = true;

View file

@ -102,17 +102,21 @@
secretKeyFile = "/var/cache-priv-key.pem"; secretKeyFile = "/var/cache-priv-key.pem";
}; };
prometheus = { prometheus = {
enable = true; enable = true;
scrapeConfigs = [{ scrapeConfigs = [
{
job_name = "ratchat-server"; job_name = "ratchat-server";
static_configs = [{ static_configs = [
targets = [ "127.0.0.1:9011" ]; {
}]; targets = ["127.0.0.1:9011"];
}]; }
}; ];
}
];
};
grafana = { grafana = {
enable = true; enable = true;
settings = { settings = {
server = { server = {
@ -123,13 +127,15 @@ grafana = {
provision = { provision = {
enable = true; enable = true;
datasources.settings.datasources = [{ datasources.settings.datasources = [
{
name = "Prometheus"; name = "Prometheus";
type = "prometheus"; type = "prometheus";
url = "http://localhost:9090"; url = "http://localhost:9090";
}]; }
];
};
}; };
};
ollama = { ollama = {
enable = true; enable = true;
@ -224,7 +230,7 @@ grafana = {
nginx = { nginx = {
enable = true; enable = true;
commonHttpConfig = '' commonHttpConfig = ''
map $http_authorization $is_allowed_user { map $http_authorization $is_allowed_user {
default 0; default 0;
"Bearer ratToken" 1; "Bearer ratToken" 1;
@ -265,7 +271,7 @@ commonHttpConfig = ''
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://127.0.0.1:9011"; proxyPass = "http://127.0.0.1:9011";
extraConfig = '' extraConfig = ''
if ($is_allowed_user = 0) { return 401; } if ($is_allowed_user = 0) { return 401; }
''; '';
}; };