diff --git a/hosts/cube/mail.nix b/hosts/cube/mail.nix index 757eec1..5d52df7 100644 --- a/hosts/cube/mail.nix +++ b/hosts/cube/mail.nix @@ -5,20 +5,22 @@ let fqdn = "mail.${domain}"; in serverSystemConfiguration { - services.prometheus.exporters.postfix = enabled { - port = 9040; - }; + services.prometheus = { + exporters.postfix = enabled { + port = 9040; + }; - services.prometheus.scrapeConfigs = [{ - job_name = "postfix"; + scrapeConfigs = [{ + job_name = "postfix"; - static_configs = [{ - labels.job = "postfix"; - targets = [ - "[::]:${toString config.services.prometheus.exporters.postfix.port}" - ]; + static_configs = [{ + labels.job = "postfix"; + targets = [ + "[::]:${toString config.services.prometheus.exporters.postfix.port}" + ]; + }]; }]; - }]; + }; services.fail2ban.jails = { dovecot.settings = { diff --git a/hosts/cube/nginx.nix b/hosts/cube/nginx.nix index 57e3aa6..0fb17da 100644 --- a/hosts/cube/nginx.nix +++ b/hosts/cube/nginx.nix @@ -3,18 +3,20 @@ serverSystemConfiguration { networking.firewall.allowedTCPPorts = [ 80 443 ]; - services.prometheus.exporters.nginx = enabled { - port = 9030; - }; + services.prometheus = { + exporters.nginx = enabled { + port = 9030; + }; - services.prometheus.scrapeConfigs = [{ - job_name = "nginx"; + scrapeConfigs = [{ + job_name = "nginx"; - static_configs = [{ - labels.job = "nginx"; - targets = [ "[::]:${toString config.services.prometheus.exporters.nginx.port}" ]; + static_configs = [{ + labels.job = "nginx"; + targets = [ "[::]:${toString config.services.prometheus.exporters.nginx.port}" ]; + }]; }]; - }]; + }; services.nginx = enabled { statusPage = true; diff --git a/hosts/cube/postgresql.nix b/hosts/cube/postgresql.nix index 15812e8..d817b40 100644 --- a/hosts/cube/postgresql.nix +++ b/hosts/cube/postgresql.nix @@ -1,19 +1,21 @@ { config, lib, ulib, pkgs, ... }: with ulib; merge (serverSystemConfiguration { - services.prometheus.exporters.postgres = enabled { - port = 9020; - runAsLocalSuperUser = true; - }; + services.prometheus = { + exporters.postgres = enabled { + port = 9020; + runAsLocalSuperUser = true; + }; - services.prometheus.scrapeConfigs = [{ - job_name = "postgres"; + scrapeConfigs = [{ + job_name = "postgres"; - static_configs = [{ - labels.job = "postgres"; - targets = [ "[::]:${toString config.services.prometheus.exporters.postgres.port}" ]; + static_configs = [{ + labels.job = "postgres"; + targets = [ "[::]:${toString config.services.prometheus.exporters.postgres.port}" ]; + }]; }]; - }]; + }; services.postgresql = enabled { package = pkgs.postgresql_14;