modules/miniflux: use custom module to replace the upstream one

This commit is contained in:
xinyangli 2024-08-05 20:04:10 +08:00
parent 1b2ed92211
commit 1906c39add
Signed by: xin
SSH key fingerprint: SHA256:qZ/tzd8lYRtUFSrfBDBMcUqV4GHKxqeqRA3huItgvbk
5 changed files with 136 additions and 18 deletions

View file

@ -0,0 +1,17 @@
{ config, lib, ... }:
let
cfg = config.custom.prometheus;
in
{
config = lib.mkIf (cfg.enable && cfg.exporters.miniflux.enable) {
systemd.services.miniflux.environment.METRICS_COLLECTOR = 1;
services.prometheus.scrapeConfigs = [
{
job_name = "miniflux";
static_configs = [
{ targets = [ config.systemd.services.miniflux.environment.LISTEN_ADDR ]; }
];
}
];
};
}