diff --git a/hosts/cube/grafana.nix b/hosts/cube/grafana.nix index 725d357..8639097 100644 --- a/hosts/cube/grafana.nix +++ b/hosts/cube/grafana.nix @@ -14,6 +14,8 @@ in serverSystemConfiguration { domain = fqdn; port = 8999; + provision = enabled {}; + settings = { database.host = "/run/postgresql"; database.type = "postgres"; diff --git a/hosts/cube/prometheus.nix b/hosts/cube/prometheus.nix index 37fd0fe..85a1b78 100644 --- a/hosts/cube/prometheus.nix +++ b/hosts/cube/prometheus.nix @@ -1,6 +1,12 @@ { config, ulib, ... }: with ulib; serverSystemConfiguration { + services.grafana.provision.datasources.settings.datasources = [{ + name = "Prometheus"; + type = "prometheus"; + url = "http://[::]:${toString config.services.prometheus.port}"; + }]; + services.prometheus = enabled { port = 9000;