Merge pull request 'docs/options: expose all clan options in NüschtOS search' (#4478) from migration-docs into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/4478
This commit is contained in:
@@ -114,9 +114,6 @@
|
||||
in
|
||||
{
|
||||
options = {
|
||||
_ = mkOption {
|
||||
type = types.raw;
|
||||
};
|
||||
instances.${name} = lib.mkOption {
|
||||
inherit description;
|
||||
type = types.submodule {
|
||||
@@ -149,20 +146,29 @@
|
||||
};
|
||||
};
|
||||
|
||||
mkScope = name: modules: {
|
||||
inherit name;
|
||||
modules = [
|
||||
{
|
||||
_module.args = { inherit clanLib; };
|
||||
_file = "docs mkScope";
|
||||
}
|
||||
{ noInstanceOptions = true; }
|
||||
../../../lib/modules/inventoryClass/interface.nix
|
||||
] ++ mapAttrsToList fakeInstanceOptions modules;
|
||||
urlPrefix = "https://github.com/nix-community/dream2nix/blob/main/";
|
||||
};
|
||||
docModules = [
|
||||
{
|
||||
inherit self;
|
||||
}
|
||||
self.modules.clan.default
|
||||
{
|
||||
options.inventory = lib.mkOption {
|
||||
type = types.submoduleWith {
|
||||
modules = [
|
||||
{ noInstanceOptions = true; }
|
||||
] ++ mapAttrsToList fakeInstanceOptions serviceModules;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
in
|
||||
{
|
||||
# Uncomment for debugging
|
||||
# legacyPackages.docModules = lib.evalModules {
|
||||
# modules = docModules;
|
||||
# };
|
||||
|
||||
packages = lib.optionalAttrs ((privateInputs ? nuschtos) || (inputs ? nuschtos)) {
|
||||
docs-options =
|
||||
(privateInputs.nuschtos or inputs.nuschtos)
|
||||
@@ -171,7 +177,13 @@
|
||||
inherit baseHref;
|
||||
title = "Clan Options";
|
||||
# scopes = mapAttrsToList mkScope serviceModules;
|
||||
scopes = [ (mkScope "Clan Inventory" serviceModules) ];
|
||||
scopes = [
|
||||
{
|
||||
name = "Clan";
|
||||
modules = docModules;
|
||||
urlPrefix = "https://git.clan.lol/clan/clan-core/src/branch/main/";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -229,8 +229,8 @@ in
|
||||
};
|
||||
|
||||
inventory = lib.mkOption {
|
||||
type = types.submodule {
|
||||
imports = [
|
||||
type = types.submoduleWith {
|
||||
modules = [
|
||||
{
|
||||
_module.args = { inherit clanLib; };
|
||||
_file = "clan interface";
|
||||
|
||||
Reference in New Issue
Block a user