forked from DGNum/infrastructure
feat(hive): Add serverNodes to the arguments
This commit is contained in:
parent
25eee32a22
commit
6d03c084a0
3 changed files with 10 additions and 8 deletions
7
hive.nix
7
hive.nix
|
@ -122,9 +122,12 @@ in
|
|||
evalConfig = args: import "${args.specialArgs.sourcePkgs.path}/nixos/lib/eval-config.nix" args;
|
||||
defaults =
|
||||
{
|
||||
lib,
|
||||
name,
|
||||
nodes,
|
||||
nodeMeta,
|
||||
nodePath,
|
||||
meta,
|
||||
sourcePkgs,
|
||||
...
|
||||
}:
|
||||
|
@ -138,6 +141,10 @@ in
|
|||
./modules/${category name}
|
||||
];
|
||||
|
||||
_module.args.serverNodes = lib.filterAttrs (
|
||||
name: _: meta.nodes.${name}.nixpkgs.system == "nixos"
|
||||
) nodes;
|
||||
|
||||
# Include default secrets
|
||||
age-secrets.sources = [ ./${nodePath}/secrets ];
|
||||
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
meta,
|
||||
nodes,
|
||||
serverNodes,
|
||||
sources,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
concatLists
|
||||
filterAttrs
|
||||
mapAttrsToList
|
||||
mkForce
|
||||
mkMerge
|
||||
|
@ -22,8 +20,6 @@ let
|
|||
probesWithTag
|
||||
;
|
||||
|
||||
serverNodes = filterAttrs (name: _: meta.nodes.${name}.nixpkgs.system == "nixos") nodes;
|
||||
|
||||
probesCfg = config.statelessUptimeKuma.probesConfig;
|
||||
|
||||
mkMonitors = name: builtins.attrNames (probesWithTag { inherit name; } probesCfg);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
config,
|
||||
meta,
|
||||
nodes,
|
||||
serverNodes,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
@ -20,7 +19,7 @@ let
|
|||
host = node;
|
||||
};
|
||||
}
|
||||
) (lib.filterAttrs (name: _: meta.nodes.${name}.nixpkgs.system == "nixos") nodes)
|
||||
) serverNodes
|
||||
);
|
||||
in
|
||||
|
||||
|
|
Loading…
Reference in a new issue