pvv-nixos-config/hosts/ildkule/services/monitoring/prometheus/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
513 B
Nix
Raw Permalink Normal View History

{ config, ... }: let
stateDir = "/data/monitoring/prometheus";
in {
2023-01-21 19:55:29 +01:00
imports = [
2024-09-14 20:21:12 +02:00
./gitea.nix
2023-01-21 19:55:29 +01:00
./matrix-synapse.nix
# TODO: enable once https://github.com/NixOS/nixpkgs/pull/242365 gets merged
# ./mysqld.nix
./postgres.nix
./machines.nix
2023-01-21 19:55:29 +01:00
];
2023-01-21 19:55:29 +01:00
services.prometheus = {
enable = true;
2023-01-21 19:55:29 +01:00
listenAddress = "127.0.0.1";
port = 9001;
ruleFiles = [ rules/synapse-v2.rules ];
};
fileSystems."/var/lib/prometheus2" = {
device = stateDir;
options = [ "bind" ];
};
2023-01-21 19:55:29 +01:00
}