Small modules config restructure
Changed variables names in every module
This commit is contained in:
1 parent
c1d2e52bf8
commit
c92b90e406
83 files changed
+616
-523
No files matched your search
@@ -1,12 +1,13 @@
|
||||
{ config, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
common = config.selfhosted.common;
|
||||
rootCfg = config.selfhosted.monitoring;
|
||||
rootCfg = config.selfhosted;
|
||||
common = rootCfg.common;
|
||||
moduleCfg = rootCfg.monitoring;
|
||||
in
|
||||
{
|
||||
config = mkIf rootCfg.enable {
|
||||
sops.templates."prometheus.yml".restartUnits = [ "${common.backend}-${rootCfg.prometheus.name}.service" ];
|
||||
config = mkIf moduleCfg.enable {
|
||||
sops.templates."prometheus.yml".restartUnits = [ "${common.backend}-${moduleCfg.prometheus.name}.service" ];
|
||||
sops.templates."prometheus.yml".content = ''
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
@@ -19,7 +20,7 @@ in
|
||||
- job_name: node
|
||||
static_configs:
|
||||
- targets:
|
||||
- ${rootCfg.nodeExporter.name}:9100
|
||||
- ${moduleCfg.nodeExporter.name}:9100
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user