Files
aloslider c92b90e406 Small modules config restructure
Changed variables names in every module
2026-10-31 19:48:50 +03:00

27 lines
684 B
Nix

{ config, lib, ... }:
with lib;
let
rootCfg = config.selfhosted;
common = rootCfg.common;
moduleCfg = rootCfg.monitoring;
in
{
config = mkIf moduleCfg.enable {
sops.templates."prometheus.yml".restartUnits = [ "${common.backend}-${moduleCfg.prometheus.name}.service" ];
sops.templates."prometheus.yml".content = ''
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: prometheus
static_configs:
- targets:
- localhost:9090
- job_name: node
static_configs:
- targets:
- ${moduleCfg.nodeExporter.name}:9100
'';
};
}