docs/modules: add main entrypoint

This commit is contained in:
Matt Sturgeon 2026-06-24 02:05:27 +01:00
parent a26ceb58b0
commit 2ab9e79e92
3 changed files with 13 additions and 7 deletions

View file

@ -11,7 +11,7 @@ let
menuConfiguration = lib.evalModules {
modules = [
pageSpecs
../modules/menu.nix
../modules
];
};
cfg = menuConfiguration.config;

12
docs/modules/default.nix Normal file
View file

@ -0,0 +1,12 @@
{ lib, ... }:
let
categoryType = lib.types.submoduleWith {
modules = [ ./category.nix ];
};
in
{
freeformType = lib.types.attrsOf categoryType;
imports = [
./menu.nix
];
}

View file

@ -5,15 +5,9 @@
...
}:
let
categoryType = lib.types.submoduleWith {
modules = [ ./category.nix ];
};
categories = removeAttrs config (builtins.attrNames options);
in
{
freeformType = lib.types.attrsOf categoryType;
options._menu = {
text = lib.mkOption {
type = lib.types.str;