+ masterPassiveObjects = let
+ otherPassiveObjects = map
+ (n: (pkgs.callPackage (./. + "/objects_" + n + ".nix") {}))
+ [ "caldance-1" "ulminfo-fr" "immae-eu" "phare" "tiboqorl-fr" ];
+ otherPassiveServices = lib.flatten (map (h: h.service or []) otherPassiveObjects);
+ otherPassiveHosts = (map (h: h.host)) otherPassiveObjects;
+ passiveNodes = lib.attrsets.filterAttrs (n: _: builtins.elem n ["backup-2" "eldiron"]) nodes;
+ toPassiveServices = map (s: s.passiveInfo.filter s // s.passiveInfo);
+ passiveServices = lib.flatten (lib.attrsets.mapAttrsToList
+ (_: n: toPassiveServices n.config.myServices.monitoring.services)
+ passiveNodes
+ );
+ in {
+ service = passiveServices ++ otherPassiveServices;
+ host = lib.lists.foldr
+ (a: b: a//b)
+ {}
+ (otherPassiveHosts ++ lib.attrsets.mapAttrsToList (_: h: h.config.myServices.monitoring.hosts) passiveNodes);
+ };
+ masterObjects = pkgs.callPackage ./objects_master.nix { inherit config; };