forked from clan/clan-core
vars: import by default & fix option rendering
This commit is contained in:
parent
129db95426
commit
0b565c40ad
|
@ -113,12 +113,13 @@ def render_option(name: str, option: dict[str, Any], level: int = 3) -> str:
|
|||
"""
|
||||
|
||||
decls = option.get("declarations", [])
|
||||
source_path, name = replace_store_path(decls[0])
|
||||
print(source_path, name)
|
||||
res += f"""
|
||||
if decls:
|
||||
source_path, name = replace_store_path(decls[0])
|
||||
print(source_path, name)
|
||||
res += f"""
|
||||
:simple-git: [{name}]({source_path})
|
||||
"""
|
||||
res += "\n"
|
||||
res += "\n"
|
||||
|
||||
return res
|
||||
|
||||
|
|
|
@ -17,5 +17,6 @@
|
|||
# Inventory
|
||||
./inventory/interface.nix
|
||||
./meta/interface.nix
|
||||
./vars
|
||||
];
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ let
|
|||
str
|
||||
submoduleWith
|
||||
;
|
||||
# the original types.submodule has strange behavior
|
||||
submodule = module: submoduleWith { modules = [ module ]; };
|
||||
options = lib.mapAttrs (_: mkOption);
|
||||
subOptions = opts: submodule { options = options opts; };
|
||||
|
@ -23,7 +24,7 @@ in
|
|||
Settings for the generated variables.
|
||||
'';
|
||||
type = submodule {
|
||||
freeFormType = anything;
|
||||
freeformType = anything;
|
||||
imports = [ ./settings.nix ];
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user