Merge pull request 'docs: move option-search into own package' (#5434) from docs-source into main

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5434
This commit is contained in:
hsjobeki
2025-10-08 14:05:38 +00:00
9 changed files with 21 additions and 21 deletions

View File

@@ -120,7 +120,7 @@ in
) (self.darwinConfigurations or { })
// lib.mapAttrs' (n: lib.nameValuePair "package-${n}") (
if system == "aarch64-darwin" then
lib.filterAttrs (n: _: n != "docs" && n != "deploy-docs" && n != "docs-options") packagesToBuild
lib.filterAttrs (n: _: n != "docs" && n != "deploy-docs" && n != "option-search") packagesToBuild
else
packagesToBuild
)

2
docs/.gitignore vendored
View File

@@ -1,6 +1,6 @@
/site/reference
/site/services/official
/site/static
/site/options
/site/option-search
/site/openapi.json
!/site/static/extra.css

View File

@@ -180,7 +180,7 @@ nav:
- services/official/zerotier.md
- services/community.md
- Search Clan Options: "/options"
- Search Clan Options: "/option-search"
docs_dir: site
site_dir: out

View File

@@ -5,7 +5,7 @@
clan-lib-openapi,
roboto,
fira-code,
docs-options,
option-search,
...
}:
let
@@ -51,9 +51,9 @@ pkgs.stdenv.mkDerivation {
chmod -R +w ./site
echo "Generated API documentation in './site/reference/' "
rm -rf ./site/options
cp -r ${docs-options} ./site/options
chmod -R +w ./site/options
rm -rf ./site/option-search
cp -r ${option-search} ./site/option-search
chmod -R +w ./site/option-search
# Link to fonts
ln -snf ${roboto}/share/fonts/truetype/Roboto-Regular.ttf ./site/static/

View File

@@ -1,8 +1,5 @@
{ inputs, self, ... }:
{
imports = [
./options/flake-module.nix
];
perSystem =
{
config,
@@ -96,7 +93,7 @@
docs = pkgs.python3.pkgs.callPackage ./default.nix {
inherit (self'.packages)
clan-cli-docs
docs-options
option-search
inventory-api-docs
clan-lib-openapi
;

View File

@@ -70,6 +70,8 @@ hide:
.clamp-toggle:checked ~ .clamp-more::after { content: "Read less"; }
</style>
trivial change
<div class="clamp-wrap" style="--lines: 3;">
<input type="checkbox" id="clan-readmore" class="clamp-toggle" />
<div class="clamp-content">
@@ -122,7 +124,7 @@ hide:
command line interface
- [Clan Options](/options)
- [Clan Options](./reference/options/clan.md)
---

View File

@@ -4,10 +4,10 @@ This section of the site provides an overview of available options and commands
---
- [Clan Configuration Option](/options) - for defining a Clan
- Learn how to use the [Clan CLI](../reference/cli/index.md)
- Explore available [services](../services/definition.md)
- [NixOS Configuration Options](../reference/clan.core/index.md) - Additional options avilable on a NixOS machine.
- [Search Clan Option](/option-search) - for defining a Clan
---

View File

@@ -2,12 +2,13 @@
{
imports = [
./clan-cli/flake-module.nix
./clan-vm-manager/flake-module.nix
./installer/flake-module.nix
./icon-update/flake-module.nix
./clan-core-flake/flake-module.nix
./clan-app/flake-module.nix
./clan-cli/flake-module.nix
./clan-core-flake/flake-module.nix
./clan-vm-manager/flake-module.nix
./icon-update/flake-module.nix
./installer/flake-module.nix
./option-search/flake-module.nix
./testing/flake-module.nix
];

View File

@@ -24,7 +24,7 @@
serviceModules = self.clan.modules;
baseHref = "/options/";
baseHref = "/option-search/";
getRoles =
module:
@@ -118,7 +118,7 @@
_file = "docs flake-module";
imports = [
{ _module.args = { inherit clanLib; }; }
(import ../../../lib/modules/inventoryClass/roles-interface.nix {
(import ../../lib/modules/inventoryClass/roles-interface.nix {
nestedSettingsOption = mkOption {
type = types.raw;
description = ''
@@ -201,7 +201,7 @@
# };
packages = {
docs-options =
option-search =
if privateInputs ? nuschtos then
privateInputs.nuschtos.packages.${pkgs.stdenv.hostPlatform.system}.mkMultiSearch {
inherit baseHref;