schema: update clan option source
This commit is contained in:
@@ -34,6 +34,7 @@
|
|||||||
Public attributes of buildClan. As specified in publicAttrs.
|
Public attributes of buildClan. As specified in publicAttrs.
|
||||||
*/
|
*/
|
||||||
buildClanWith =
|
buildClanWith =
|
||||||
|
|
||||||
{
|
{
|
||||||
clan-core,
|
clan-core,
|
||||||
# TODO: Below should be module options such that the user can override them?
|
# TODO: Below should be module options such that the user can override them?
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
self,
|
self,
|
||||||
self',
|
self',
|
||||||
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
flakeOptions,
|
flakeOptions,
|
||||||
...
|
...
|
||||||
@@ -23,7 +24,19 @@ let
|
|||||||
_module.args = { inherit (self) clanLib; };
|
_module.args = { inherit (self) clanLib; };
|
||||||
});
|
});
|
||||||
|
|
||||||
clanSchema = jsonLib.parseOptions (flakeOptions.clan.type.getSubOptions [ "clan" ]) { };
|
opts = (flakeOptions.flake.type.getSubOptions [ "flake" ]);
|
||||||
|
clanOpts = opts.clan.type.getSubOptions [ "clan" ];
|
||||||
|
include = [
|
||||||
|
"directory"
|
||||||
|
"inventory"
|
||||||
|
"machines"
|
||||||
|
"meta"
|
||||||
|
"modules"
|
||||||
|
"outputs"
|
||||||
|
"secrets"
|
||||||
|
"templates"
|
||||||
|
];
|
||||||
|
clanSchema = jsonLib.parseOptions (lib.filterAttrs (n: _v: lib.elem n include) clanOpts) { };
|
||||||
|
|
||||||
renderSchema = pkgs.writers.writePython3Bin "render-schema" {
|
renderSchema = pkgs.writers.writePython3Bin "render-schema" {
|
||||||
flakeIgnore = [
|
flakeIgnore = [
|
||||||
|
|||||||
@@ -187,8 +187,6 @@ ClanMetaType = Unknown
|
|||||||
ClanModulesType = dict[str, dict[str, Any] | list[Any] | bool | float | int | str | None]
|
ClanModulesType = dict[str, dict[str, Any] | list[Any] | bool | float | int | str | None]
|
||||||
ClanOutputsType = Output
|
ClanOutputsType = Output
|
||||||
ClanSecretsType = Secret
|
ClanSecretsType = Secret
|
||||||
ClanSelfType = dict[str, Any] | list[Any] | bool | float | int | str
|
|
||||||
ClanSpecialargsType = dict[str, dict[str, Any] | list[Any] | bool | float | int | str | None]
|
|
||||||
ClanTemplatesType = Template
|
ClanTemplatesType = Template
|
||||||
|
|
||||||
class Clan(TypedDict):
|
class Clan(TypedDict):
|
||||||
@@ -199,6 +197,4 @@ class Clan(TypedDict):
|
|||||||
modules: NotRequired[ClanModulesType]
|
modules: NotRequired[ClanModulesType]
|
||||||
outputs: NotRequired[ClanOutputsType]
|
outputs: NotRequired[ClanOutputsType]
|
||||||
secrets: NotRequired[ClanSecretsType]
|
secrets: NotRequired[ClanSecretsType]
|
||||||
self: NotRequired[ClanSelfType]
|
|
||||||
specialArgs: NotRequired[ClanSpecialargsType]
|
|
||||||
templates: NotRequired[ClanTemplatesType]
|
templates: NotRequired[ClanTemplatesType]
|
||||||
|
|||||||
Reference in New Issue
Block a user