fuck it, no more fancy stuff, just do it like this
Some checks failed
/ Check formatting (push) Failing after 1s

This commit is contained in:
Ittihadyya 2024-12-20 18:07:15 +02:00
parent 20ef619d75
commit 6c59595a11

View file

@ -1,4 +1,4 @@
{molecules, ...}:{ {
universal.modules = [ universal.modules = [
{ {
services.prometheus.exporters = { services.prometheus.exporters = {
@ -13,14 +13,6 @@
]; ];
glucose.modules = [ glucose.modules = [
({ ({
nixpkgs,
molecules,
...
}: let
ip = i: "10.24.1.${toString i}";
ips = builtins.mapAttrs (nixpkgs.lib.const ip) molecules;
ips' = builtins.mapAttrs (name: ip: "${ip}:6703") ips;
in {
services.prometheus = { services.prometheus = {
enable = true; enable = true;
port = 6750; port = 6750;
@ -31,7 +23,7 @@
job_name = "devices"; job_name = "devices";
static_configs = [ static_configs = [
{ {
targets = ips'; targets = [ "10.24.1.4:6703" "10.24.1.9:6703" "10.24.1.16:6703" "10.24.1.225:6703" "10.24.1.196:6703" ];
} }
]; ];
} }