1
1
mirror of https://github.com/dali99/nixos-matrix-modules.git synced 2024-12-22 10:57:29 +01:00

Automatic metrics listener

This commit is contained in:
Daniel Lovbrotte Olsen 2022-10-21 19:22:45 +02:00
parent b6f34dd2c6
commit 3053f9b2f7

View File

@ -277,7 +277,7 @@ in
description = "disable presence tracking, if you're having perfomance issues this can have a big impact";
default = true;
};
/
options.listeners = lib.mkOption {
type = lib.types.listOf (lib.types.submodule {
options.port = lib.mkOption {
@ -342,6 +342,13 @@ in
{ names = [ "replication" ]; }
];
})
(lib.mkIf cfg.settings.enable_metrics {
port = 9000;
bind_addresses = [ "127.0.0.1" ];
resources = [
{ names = [ "metrics" ]; }
];
})
];
};