Docs: minor improvements
This commit is contained in:
@@ -43,7 +43,7 @@ exclude_docs: |
|
|||||||
nav:
|
nav:
|
||||||
- Home: index.md
|
- Home: index.md
|
||||||
- Getting Started:
|
- Getting Started:
|
||||||
- getting-started/index.md
|
- Getting Started: getting-started/index.md
|
||||||
- Installer: getting-started/installer.md
|
- Installer: getting-started/installer.md
|
||||||
- Configure: getting-started/configure.md
|
- Configure: getting-started/configure.md
|
||||||
- Secrets & Facts: getting-started/secrets.md
|
- Secrets & Facts: getting-started/secrets.md
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
{
|
{
|
||||||
|
clan-core,
|
||||||
pkgs,
|
pkgs,
|
||||||
module-docs,
|
module-docs,
|
||||||
clan-cli-docs,
|
clan-cli-docs,
|
||||||
@@ -14,7 +15,9 @@ in
|
|||||||
pkgs.stdenv.mkDerivation {
|
pkgs.stdenv.mkDerivation {
|
||||||
name = "clan-documentation";
|
name = "clan-documentation";
|
||||||
|
|
||||||
src = ../.;
|
# Points to repository root.
|
||||||
|
# so that we can access directories outside of docs to include code snippets
|
||||||
|
src = clan-core;
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[
|
[
|
||||||
@@ -29,6 +32,8 @@ pkgs.stdenv.mkDerivation {
|
|||||||
filelock # FIXME: this should be already provided by mkdocs-rss-plugin
|
filelock # FIXME: this should be already provided by mkdocs-rss-plugin
|
||||||
]);
|
]);
|
||||||
configurePhase = ''
|
configurePhase = ''
|
||||||
|
pushd docs
|
||||||
|
|
||||||
mkdir -p ./site/reference/cli
|
mkdir -p ./site/reference/cli
|
||||||
cp -af ${module-docs}/* ./site/reference/
|
cp -af ${module-docs}/* ./site/reference/
|
||||||
cp -af ${clan-cli-docs}/* ./site/reference/cli/
|
cp -af ${clan-cli-docs}/* ./site/reference/cli/
|
||||||
|
|||||||
@@ -89,6 +89,7 @@
|
|||||||
};
|
};
|
||||||
packages = {
|
packages = {
|
||||||
docs = pkgs.python3.pkgs.callPackage ./default.nix {
|
docs = pkgs.python3.pkgs.callPackage ./default.nix {
|
||||||
|
clan-core = self;
|
||||||
inherit (self'.packages) clan-cli-docs inventory-api-docs;
|
inherit (self'.packages) clan-cli-docs inventory-api-docs;
|
||||||
inherit (inputs) nixpkgs;
|
inherit (inputs) nixpkgs;
|
||||||
inherit module-docs;
|
inherit module-docs;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ This site will guide you through authoring your first module. Explaining which c
|
|||||||
Under construction
|
Under construction
|
||||||
:fontawesome-solid-road-barrier: :fontawesome-solid-road-barrier: :fontawesome-solid-road-barrier:
|
:fontawesome-solid-road-barrier: :fontawesome-solid-road-barrier: :fontawesome-solid-road-barrier:
|
||||||
|
|
||||||
## Bootstrapping a `clanModule`
|
## Bootstrapping the `clanModule`
|
||||||
|
|
||||||
A ClanModule is a specific subset of a [NixOS Module](https://nix.dev/tutorials/module-system/index.html), but it has some constraints and might be used via the [Inventory](../manual/inventory.md) interface.
|
A ClanModule is a specific subset of a [NixOS Module](https://nix.dev/tutorials/module-system/index.html), but it has some constraints and might be used via the [Inventory](../manual/inventory.md) interface.
|
||||||
|
|
||||||
@@ -40,9 +40,6 @@ clanModules/borgbackup
|
|||||||
|
|
||||||
The next step is to register the module via the `clanModules` attribute.
|
The next step is to register the module via the `clanModules` attribute.
|
||||||
|
|
||||||
!!! Note
|
|
||||||
Currently ClanModules should be contributed to the clan-core repository. Ad-hoc loading modules is not recommended / supported yet.
|
|
||||||
|
|
||||||
```nix title="clanModules/flake-module.nix"
|
```nix title="clanModules/flake-module.nix"
|
||||||
--8<-- "clanModules/flake-module.nix:0:6"
|
--8<-- "clanModules/flake-module.nix:0:6"
|
||||||
# Register your new module here
|
# Register your new module here
|
||||||
@@ -51,7 +48,7 @@ The next step is to register the module via the `clanModules` attribute.
|
|||||||
|
|
||||||
## Readme
|
## Readme
|
||||||
|
|
||||||
The `README.md` is a required file. It MUST contain frontmatter in [`toml`]() format.
|
The `README.md` is a required file. It MUST contain frontmatter in [`toml`](https://toml.io) format.
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user