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