mirror of
https://gitlab.com/TECHNOFAB/nixlets.git
synced 2026-03-22 10:39:27 +01:00
feat: add support for importing nixlets into each other
This commit is contained in:
parent
c44a5fc995
commit
2c21317f45
6 changed files with 345 additions and 151 deletions
|
|
@ -3,8 +3,22 @@
|
|||
cell,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) doclib;
|
||||
inherit (inputs) pkgs doclib nixlet-lib;
|
||||
inherit (cell) nixlets;
|
||||
|
||||
optionsDoc = doclib.mkOptionDocs {
|
||||
module = nixlet-lib.nixletModule;
|
||||
roots = [
|
||||
{
|
||||
url = "https://gitlab.com/TECHNOFAB/nixlets/-/blob/main/lib";
|
||||
path = "${inputs.self}/lib";
|
||||
}
|
||||
];
|
||||
};
|
||||
optionsDocs = pkgs.runCommand "options-docs" {} ''
|
||||
mkdir -p $out
|
||||
ln -s ${optionsDoc} $out/options.md
|
||||
'';
|
||||
in
|
||||
(doclib.mkDocs {
|
||||
docs."default" = {
|
||||
|
|
@ -23,9 +37,13 @@ in
|
|||
domains = ["nixlets.projects.tf"];
|
||||
};
|
||||
};
|
||||
macros = {
|
||||
enable = true;
|
||||
includeDir = toString optionsDocs;
|
||||
};
|
||||
dynamic-nav = {
|
||||
enable = true;
|
||||
files."Nixlets Values" = builtins.map (val: {${val.name} = val.mkDocs {};}) (builtins.attrValues nixlets);
|
||||
files."Nixlets Values" = builtins.map (val: {${val.name} = val.mkDocs {fullValues = true;};}) (builtins.attrValues nixlets);
|
||||
};
|
||||
config = {
|
||||
site_name = "Nixlets";
|
||||
|
|
@ -45,6 +63,7 @@ in
|
|||
{"Usage" = "usage.md";}
|
||||
{"Generating Docs" = "generating_docs.md";}
|
||||
{"Secrets" = "secrets.md";}
|
||||
{"Options" = "options.md";}
|
||||
];
|
||||
markdown_extensions = [
|
||||
{
|
||||
|
|
|
|||
6
nix/repo/flake.lock
generated
6
nix/repo/flake.lock
generated
|
|
@ -38,11 +38,11 @@
|
|||
"nixmkdocs-lib": {
|
||||
"locked": {
|
||||
"dir": "lib",
|
||||
"lastModified": 1766062227,
|
||||
"narHash": "sha256-jhr5CUi9eDeMIAJn7ayXP8Wr+Y2loV5EhdDIKDkRIdw=",
|
||||
"lastModified": 1767549915,
|
||||
"narHash": "sha256-by3r2qddlyzylup5fzSaDwtoy3eFHNKb65IuIq6bsAs=",
|
||||
"owner": "TECHNOFAB",
|
||||
"repo": "nixmkdocs",
|
||||
"rev": "cb0bb5dc3382e8ba5d81324a2f1fd94ccd5a5df4",
|
||||
"rev": "f3b2f4b19178e97c5580367be0f97e61a085db6d",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue