refactor(extranix): move module declaration and give descriptions
All checks were successful
Check meta / check_dns (pull_request) Successful in 18s
Check meta / check_meta (pull_request) Successful in 26s
Check workflows / check_workflows (pull_request) Successful in 26s
Run pre-commit on all files / pre-commit (push) Successful in 45s
Build all the nodes / ap01 (pull_request) Successful in 1m4s
Build all the nodes / bridge01 (pull_request) Successful in 1m39s
Build all the nodes / geo01 (pull_request) Successful in 1m42s
Build all the nodes / geo02 (pull_request) Successful in 1m37s
Build all the nodes / hypervisor01 (pull_request) Successful in 1m36s
Build all the nodes / netcore02 (pull_request) Successful in 28s
Build all the nodes / hypervisor02 (pull_request) Successful in 1m28s
Build all the nodes / compute01 (pull_request) Successful in 3m10s
Build all the nodes / hypervisor03 (pull_request) Successful in 1m42s
Build all the nodes / rescue01 (pull_request) Successful in 2m3s
Build all the nodes / storage01 (pull_request) Successful in 2m4s
Build all the nodes / vault01 (pull_request) Successful in 1m57s
Build all the nodes / web02 (pull_request) Successful in 1m40s
Run pre-commit on all files / pre-commit (pull_request) Successful in 42s
Build all the nodes / web01 (pull_request) Successful in 2m20s
Build all the nodes / web03 (pull_request) Successful in 1m36s

This commit is contained in:
catvayor 2024-12-22 01:05:22 +01:00
parent 8bfbf09fd4
commit 9e9c2a4fcf
Signed by: lbailly
GPG key ID: CE3E645251AC63F3
12 changed files with 64 additions and 9 deletions

View file

@ -32,7 +32,7 @@ precedence = "closest"
[[annotations]]
SPDX-FileCopyrightText = "2024 Lubin Bailly <lubin.bailly@dgnum.eu>"
SPDX-License-Identifier = "EUPL-1.2"
path = ["machines/nixos/compute01/search/0001-revert-don-t-parse-md-in-js.patch", "machines/nixos/compute01/search/0002-chore-remove-useless-dependencies.patch", "machines/nixos/compute01/search/0003-feat-separate-HTML-description-of-MD-description.patch", "machines/nixos/compute01/search/0004-fix-indentation-of-ul.patch", "machines/nixos/compute01/search/0005-feat-match-all-substring-by-default.patch"]
path = ["modules/nixos/extranix/0001-revert-don-t-parse-md-in-js.patch", "modules/nixos/extranix/0002-chore-remove-useless-dependencies.patch", "modules/nixos/extranix/0003-feat-separate-HTML-description-of-MD-description.patch", "modules/nixos/extranix/0004-fix-indentation-of-ul.patch", "modules/nixos/extranix/0005-feat-match-all-substring-by-default.patch"]
precedence = "closest"
[[annotations]]

View file

@ -103,11 +103,11 @@ let
}
{
path = [
"machines/nixos/compute01/search/0001-revert-don-t-parse-md-in-js.patch"
"machines/nixos/compute01/search/0002-chore-remove-useless-dependencies.patch"
"machines/nixos/compute01/search/0003-feat-separate-HTML-description-of-MD-description.patch"
"machines/nixos/compute01/search/0004-fix-indentation-of-ul.patch"
"machines/nixos/compute01/search/0005-feat-match-all-substring-by-default.patch"
"modules/nixos/extranix/0001-revert-don-t-parse-md-in-js.patch"
"modules/nixos/extranix/0002-chore-remove-useless-dependencies.patch"
"modules/nixos/extranix/0003-feat-separate-HTML-description-of-MD-description.patch"
"modules/nixos/extranix/0004-fix-indentation-of-ul.patch"
"modules/nixos/extranix/0005-feat-match-all-substring-by-default.patch"
];
copyright = "2024 Lubin Bailly <lubin.bailly@dgnum.eu>";
}

View file

@ -12,9 +12,6 @@ let
host = "search.infra.dgnum.eu";
in
{
imports = [
./module.nix
];
services = {
nginx.virtualHosts.${host} = {
enableACME = true;

View file

@ -32,6 +32,7 @@
"dgn-vm-variant"
"dgn-web"
"django-apps"
"extranix"
])
++ [
"${sources.agenix}/modules/age.nix"

View file

@ -136,13 +136,25 @@ in
specialArgs = mkOption {
type = types.attrs;
default = { };
description = ''
Special arguments to give to evalModules.
'';
};
paths = mkOption {
type = types.listOf types.deferredModule;
description = ''
Modules to from which to document options.
'';
};
ignored-modules = mkOption {
type = types.listOf types.deferredModule;
default = [ ];
description = ''
Modules required to make modules of `paths` valid.
'';
example = ''
import "''${infra-modulesPath}/module-list.nix"
'';
};
path-translations = mkOption {
type =
@ -150,26 +162,71 @@ in
path-mod.options = {
base = mkOption {
type = types.path;
description = ''
Base path of some module files to be documented.
'';
};
url = mkOption {
type = types.str;
description = ''
Url root to use for files on this path.
'';
};
};
in
types.listOf (types.submodule path-mod);
description = ''
Rules to convert file paths to urls in the documentation to indicate where
the option is declared.
'';
};
};
in
types.attrsOf (types.submodule module-mod);
description = ''
Sets of modules to be documented separately. The identifier to give for
`settings.params.release_current_stable` (which is the default module shown) is the key after
passing through `sanitizeDerivationName`.
'';
};
settings = mkOption {
inherit (yaml) type;
description = ''
Settings for the `config.yaml` for the hugo instantiation.
'';
example = {
baseUrl = "https://example.org/";
title = "Module documentation";
languageCode = "en-us";
params = {
release_current_stable = "Some-Module";
logo = "logo.png";
footer_credits_line = ''
Based on <a href="https://github.com/mipmip/home-manager-option-search">Home Manager Option Search</a>
'';
footer_copyright_line = ''
Made by catvayor for the <a href="https://dgnum.eu">DGNum</a>.
'';
main_menu = [
{
name = ''Sources'';
url = "https://git.example.org/";
}
];
};
};
};
static-data = mkOption {
type = types.path;
description = ''
Static files for the website. Should have `images/favicon.png` for favicon.
'';
};
host = mkOption {
type = types.str;
description = ''
Hostname of the service.
'';
};
};
config = mkIf cfg.enable {