rico1: add grafana

This commit is contained in:
Adithya 2024-10-27 18:37:05 +05:30
parent 5febebe8f1
commit 203dfe739d
Signed by: adtya
GPG key ID: B8857BFBA2C47B9C
3 changed files with 35 additions and 1 deletions

View file

@ -77,7 +77,7 @@ in
"alertmanager.labs.adtya.xyz" = "10.10.10.11";
"blocky.labs.adtya.xyz" = "10.10.10.11";
"frp.labs.adtya.xyz" = "10.10.10.10";
"grafana.labs.adtya.xyz" = "10.10.10.10";
"grafana.labs.adtya.xyz" = "10.10.10.11";
"loki.labs.adtya.xyz" = "10.10.10.11";
"prometheus.labs.adtya.xyz" = "10.10.10.10";
"transmission.labs.adtya.xyz" = "10.10.10.14";

View file

@ -5,6 +5,7 @@ _: {
./wiki.nix
./alertmanager.nix
./blocky.nix
./grafana.nix
./loki
../../../shared/prometheus-exporters.nix
../../../shared/promtail.nix

View file

@ -0,0 +1,33 @@
_:
let
inherit (import ../../../shared/caddy-helpers.nix) logFormat;
domainName = "grafana.labs.adtya.xyz";
in
{
services = {
caddy = {
virtualHosts."${domainName}" = {
logFormat = logFormat domainName;
extraConfig = ''
reverse_proxy 127.0.0.1:9091
'';
};
};
grafana = {
enable = true;
settings = {
server = {
domain = domainName;
http_addr = "127.0.0.1";
http_port = 9091;
};
analytics = {
enable = false;
};
panels = {
disable_sanitize_html = true;
};
};
};
};
}