docs/modules: add main entrypoint
This commit is contained in:
parent
a26ceb58b0
commit
2ab9e79e92
3 changed files with 13 additions and 7 deletions
|
|
@ -11,7 +11,7 @@ let
|
|||
menuConfiguration = lib.evalModules {
|
||||
modules = [
|
||||
pageSpecs
|
||||
../modules/menu.nix
|
||||
../modules
|
||||
];
|
||||
};
|
||||
cfg = menuConfiguration.config;
|
||||
|
|
|
|||
12
docs/modules/default.nix
Normal file
12
docs/modules/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ lib, ... }:
|
||||
let
|
||||
categoryType = lib.types.submoduleWith {
|
||||
modules = [ ./category.nix ];
|
||||
};
|
||||
in
|
||||
{
|
||||
freeformType = lib.types.attrsOf categoryType;
|
||||
imports = [
|
||||
./menu.nix
|
||||
];
|
||||
}
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue