Inventory: init: deployment info for machines
This commit is contained in:
parent
2947f64f3a
commit
ac95878ead
@ -120,8 +120,8 @@ in
|
||||
machines
|
||||
pkgsForSystem
|
||||
meta
|
||||
inventory
|
||||
;
|
||||
inventory = (lib.traceValSeq cfg.inventory);
|
||||
};
|
||||
};
|
||||
_file = __curPos.file;
|
||||
|
@ -72,6 +72,13 @@ let
|
||||
"nixpkgs"
|
||||
"hostSystem"
|
||||
] null config;
|
||||
|
||||
deploymentInfo.targetHost = lib.attrByPath [
|
||||
"clan"
|
||||
"core"
|
||||
"networking"
|
||||
"targetHost"
|
||||
] null config;
|
||||
}
|
||||
) machines;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ let
|
||||
availableTags = lib.foldlAttrs (
|
||||
acc: _: v:
|
||||
v.tags or [ ] ++ acc
|
||||
) [ ] (lib.traceValSeq inventory.machines);
|
||||
) [ ] (inventory.machines);
|
||||
|
||||
tagMembers = builtins.attrNames (
|
||||
lib.filterAttrs (_n: v: builtins.elem tag v.tags or [ ]) inventory.machines
|
||||
|
@ -49,6 +49,17 @@ in
|
||||
default = null;
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
deploymentInfo = lib.mkOption {
|
||||
default = { };
|
||||
type = types.submodule {
|
||||
options = {
|
||||
targetHost = lib.mkOption {
|
||||
default = null;
|
||||
type = types.nullOr types.str;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user