diff --git a/docs/nix/scripts/renderOptions.py b/docs/nix/scripts/renderOptions.py index 5984c6a2..807cb12b 100644 --- a/docs/nix/scripts/renderOptions.py +++ b/docs/nix/scripts/renderOptions.py @@ -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 diff --git a/nixosModules/clanCore/default.nix b/nixosModules/clanCore/default.nix index c9b7ff3e..d367afa4 100644 --- a/nixosModules/clanCore/default.nix +++ b/nixosModules/clanCore/default.nix @@ -17,5 +17,6 @@ # Inventory ./inventory/interface.nix ./meta/interface.nix + ./vars ]; } diff --git a/nixosModules/clanCore/vars/interface.nix b/nixosModules/clanCore/vars/interface.nix index 0f596919..f9bce626 100644 --- a/nixosModules/clanCore/vars/interface.nix +++ b/nixosModules/clanCore/vars/interface.nix @@ -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 ]; }; };