Baldur: Grafana

This commit is contained in:
Filippo Berto 2024-05-26 21:45:59 +02:00
parent 3474daf269
commit f70935d0a5
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, config, ... }:
# let
# freya_hosts = lib.attrsets.filterAttrs (k: v: builtins.elem "freya.zto" v) config.networking.hosts;
# freya_ipv4 = builtins.elemAt 0 (builtins.attrNames freya_hosts);
@ -39,6 +39,16 @@
time.timeZone = "Europe/Rome";
services = {
grafana = {
enable = true;
settings = {
server = {
http_addr = "127.0.0.1";
domain = "bertof.net";
root_url = "https://grafana.bertof.net/";
};
};
};
fail2ban = {
enable = true;
bantime-increment.enable = true;
@ -104,6 +114,13 @@
'';
};
};
"grafana.bertof.net" = ssl // {
locations."/" = {
proxyPass = "http://${toString config.services.grafana.settings.server.http_addr}:${toString config.services.grafana.settings.server.http_port}";
proxyWebsockets = true;
recommendedProxySettings = true;
};
};
"radarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://freya.tsn:7878/"; proxyWebsockets = true; }; };
"sonarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://freya.tsn:8989/"; proxyWebsockets = true; }; };
"lidarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://freya.tsn:8686/"; proxyWebsockets = true; }; };