diff --git a/applications/prometheus.nix b/applications/prometheus.nix index 9ae7df8..dbd7275 100644 --- a/applications/prometheus.nix +++ b/applications/prometheus.nix @@ -10,6 +10,11 @@ in { imports = []; options.services.skynet."${name}" = { + #list of servers passed in for monitoring + servers = mkOption { + type = types.listOf types.str; + }; + server = { enable = mkEnableOption "Prometheus Server"; host = { @@ -26,10 +31,6 @@ in { type = types.port; default = 9001; }; - #list of servers passed in for monitoring - servers = mkOption { - type = types.listOf types.str; - }; }; collecter_port = mkOption { diff --git a/machines/marvin.nix b/machines/marvin.nix index 3f25f48..12465f0 100644 --- a/machines/marvin.nix +++ b/machines/marvin.nix @@ -59,25 +59,10 @@ in { }; port = 9001; - - servers = [ - "agentjones" - "cadie" - "earth" - "galatea" - "gir" - "glados" - "kitt" - "marvin" - "neuromancer" - "optimus" - "skynet" - "vendetta" - "vigil" - "wheatly" - ]; }; + services.skynet.prometheus.servers = lib.attrsets.mapAttrsToList (server: server.name) nodes; + services.skynet.grafana = { enable = true;