diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index bbf6832d3..3b98f3590 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -43,7 +43,7 @@ exclude_docs: | nav: - Home: index.md - Getting Started: - - getting-started/index.md + - Getting Started: getting-started/index.md - Installer: getting-started/installer.md - Configure: getting-started/configure.md - Secrets & Facts: getting-started/secrets.md diff --git a/docs/nix/default.nix b/docs/nix/default.nix index 01dae322f..e4f591ffc 100644 --- a/docs/nix/default.nix +++ b/docs/nix/default.nix @@ -1,4 +1,5 @@ { + clan-core, pkgs, module-docs, clan-cli-docs, @@ -14,7 +15,9 @@ in pkgs.stdenv.mkDerivation { 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 = [ @@ -29,6 +32,8 @@ pkgs.stdenv.mkDerivation { filelock # FIXME: this should be already provided by mkdocs-rss-plugin ]); configurePhase = '' + pushd docs + mkdir -p ./site/reference/cli cp -af ${module-docs}/* ./site/reference/ cp -af ${clan-cli-docs}/* ./site/reference/cli/ diff --git a/docs/nix/flake-module.nix b/docs/nix/flake-module.nix index 29acc7f4c..4793962eb 100644 --- a/docs/nix/flake-module.nix +++ b/docs/nix/flake-module.nix @@ -89,6 +89,7 @@ }; packages = { docs = pkgs.python3.pkgs.callPackage ./default.nix { + clan-core = self; inherit (self'.packages) clan-cli-docs inventory-api-docs; inherit (inputs) nixpkgs; inherit module-docs; diff --git a/docs/site/clanmodules/index.md b/docs/site/clanmodules/index.md index 430df9a40..7e6878130 100644 --- a/docs/site/clanmodules/index.md +++ b/docs/site/clanmodules/index.md @@ -6,7 +6,7 @@ This site will guide you through authoring your first module. Explaining which c Under construction :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. @@ -40,9 +40,6 @@ clanModules/borgbackup 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" --8<-- "clanModules/flake-module.nix:0:6" # Register your new module here @@ -51,7 +48,7 @@ The next step is to register the module via the `clanModules` attribute. ## 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 ---