Add grafana
This commit is contained in:
parent
26cee97c7b
commit
e64f96ecdb
3 changed files with 24 additions and 0 deletions
|
@ -26,6 +26,7 @@
|
|||
./services/nextcloud.nix
|
||||
./services/unpackerr.nix
|
||||
./services/qbittorrent.nix
|
||||
./services/grafana.nix
|
||||
inputs.lastfm-status.nixosModules.default
|
||||
inputs.confess.nixosModules.default
|
||||
inputs.common-modules.nixosModules.nixos-upgrade
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
"bazarr.internal"
|
||||
"lidarr.internal"
|
||||
"syncthing.internal"
|
||||
"stats.internal"
|
||||
] "100.93.150.89";
|
||||
};
|
||||
conditional =
|
||||
|
|
22
services/grafana.nix
Normal file
22
services/grafana.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, ... }: {
|
||||
services = {
|
||||
grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
http_addr = "127.0.0.1";
|
||||
http_port = 3002;
|
||||
enable_gzip = true;
|
||||
domain = "stats.internal";
|
||||
};
|
||||
|
||||
analytics.reporting_enabled = false;
|
||||
};
|
||||
};
|
||||
|
||||
caddy.virtualHosts."http://stats.internal".extraConfig = ''
|
||||
@local remote_ip private_ranges 100.64.0.0/10
|
||||
reverse_proxy @local http://${config.services.grafana.settings.server.http_addr}:${toString config.services.grafana.settings.server.http_port}
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue