host/tatos: add grafana

This commit is contained in:
Dmitriy Pleshevskiy 2025-01-29 22:50:53 +03:00
parent d0b2785350
commit 3025145ec6
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2
2 changed files with 31 additions and 0 deletions
hosts/tatos/services

View file

@ -2,6 +2,7 @@
{
imports = [
./grafana
./miniflux
./wireguard
./nginx.nix

View file

@ -0,0 +1,30 @@
{ config, pkgs, ... }:
let
addr = "127.0.0.1";
port = 33002;
domain = "grafana.pleshevski.ru";
in
{
services.grafana = {
enable = true;
package = pkgs.unstable.grafana;
settings = {
server = {
http_addr = addr;
http_port = port;
inherit domain;
};
};
};
services.nginx.virtualHosts."${domain}" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://${addr}:${toString port}";
proxyWebsockets = true;
};
};
}