forked from wurzel/fruitbasket
23 lines
504 B
Nix
23 lines
504 B
Nix
{ config, pkgs, ... }:
|
|
let
|
|
domain = "monitoring.${config.networking.domain}";
|
|
in {
|
|
# grafana configuration
|
|
services.grafana = {
|
|
enable = true;
|
|
port = 2342;
|
|
};
|
|
|
|
services.prometheus = {
|
|
enable = true;
|
|
port = 9001;
|
|
};
|
|
|
|
# nginx reverse proxy
|
|
services.nginx.virtualHosts.${domain} = {
|
|
locations."/" = {
|
|
proxyPass = "http://localhost:${toString config.services.grafana.port}";
|
|
proxyWebsockets = true;
|
|
};
|
|
};
|
|
}
|