mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
chore(monitoring): nf-fmt-nix
This commit is contained in:
parent
6fb140c7e6
commit
a0a7df1b0e
6 changed files with 164 additions and 141 deletions
|
|
@ -7,8 +7,9 @@
|
|||
inherit (lib.attrsets) attrValues;
|
||||
inherit (lib.lists) concatMap toList;
|
||||
allExporters = let
|
||||
exporters = removeAttrs config.services.prometheus.exporters [ "unifi-poller" ];
|
||||
in concatMap toList (attrValues exporters);
|
||||
exporters = removeAttrs config.services.prometheus.exporters ["unifi-poller"];
|
||||
in
|
||||
concatMap toList (attrValues exporters);
|
||||
in {
|
||||
config = {
|
||||
services.prometheus.exporters = {
|
||||
|
|
@ -57,8 +58,11 @@ in {
|
|||
}
|
||||
];
|
||||
};
|
||||
networking.firewall.interfaces.lan.allowedTCPPorts = map (exporter:
|
||||
mkIf (exporter.enable && !exporter.openFirewall) 999
|
||||
) allExporters;
|
||||
networking.firewall.interfaces.lan.allowedTCPPorts =
|
||||
map (
|
||||
exporter:
|
||||
mkIf (exporter.enable && !exporter.openFirewall) exporter.port
|
||||
)
|
||||
allExporters;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue