added grafana to queen

This commit is contained in:
Lillian Violet 2024-03-26 14:13:35 +01:00
parent 45fc46cb9f
commit b5be1009cf
3 changed files with 40 additions and 0 deletions

View file

@ -0,0 +1,14 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
imports = [
./grafana
#./loki
#./prometheus
];
}

View file

@ -0,0 +1,25 @@
{
config,
pkgs,
...
}: {
# grafana configuration
services.grafana = {
enable = true;
domain = "grafana.lillianviolet.dev";
http_port = 2342;
http_addr = "127.0.0.1";
};
# nginx reverse proxy
services.nginx.virtualHosts.${config.services.grafana.domain} = {
## Force HTTP redirect to HTTPS
forceSSL = true;
## LetsEncrypt
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${toString config.services.grafana.port}";
proxyWebsockets = true;
};
};
}

View file

@ -15,5 +15,6 @@
./postgres ./postgres
./roundcube ./roundcube
./coturn ./coturn
./dashboard
]; ];
} }