Skip to content

Commit

Permalink
fix documentation generation after update
Browse files Browse the repository at this point in the history
  • Loading branch information
ibizaman committed Nov 21, 2024
1 parent 7d6c088 commit eb66a9b
Show file tree
Hide file tree
Showing 11 changed files with 1,690 additions and 64 deletions.
2 changes: 1 addition & 1 deletion demo/homeassistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ chmod 600 sshkey

This is only needed because git mangles with the permissions. You will not even see this change in
`git status`.
### Deploy with Colmena {#demo-homeassitant-deploy-colmena}
### Deploy with Colmena {#demo-homeassistant-deploy-colmena}

If you deploy with Colmena, you must first build the VM and start it:

Expand Down
6 changes: 3 additions & 3 deletions demo/nextcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ssh -F ssh_config example

:::: {.note}
This section corresponds to the `basic` section of the [Nextcloud
manual](services-nextcloud.html#services-nextcloud-server-usage-basic).
manual](services-nextcloud.html#services-nextcloudserver-usage-basic).
::::

Assuming you already deployed the `basic` demo, now you must add the following entry to the
Expand Down Expand Up @@ -143,7 +143,7 @@ This is the admin user of Nextcloud and that's the end of the `basic` demo.

:::: {.note}
This section corresponds to the `ldap` section of the [Nextcloud
manual](services-nextcloud.html#services-nextcloud-server-usage-ldap).
manual](services-nextcloud.html#services-nextcloudserver-usage-ldap).
::::

Assuming you already deployed the `ldap` demo, now you must add the following entry to the
Expand Down Expand Up @@ -182,7 +182,7 @@ This is the end of the `ldap` demo.

:::: {.note}
This section corresponds to the `sso` section of the [Nextcloud
manual](services-nextcloud.html#services-nextcloud-server-usage-oidc).
manual](services-nextcloud.html#services-nextcloudserver-usage-oidc).
::::

At this point, it is assumed you already deployed the `sso` demo. There is no host to add to
Expand Down
1 change: 1 addition & 0 deletions docs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ in stdenv.mkDerivation {
nixos-render-docs manual html \
--manpage-urls ${manpage-urls} \
--redirects ./redirects.json \
--media-dir media \
--revision ${lib.trivial.revisionWithDefault release} \
--stylesheet static/style.css \
Expand Down
2 changes: 1 addition & 1 deletion docs/demos.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ your local machine with minimal manual steps.
demo/homeassistant/README.md
```

```{=include=} chapters html:into-file=//demo-nextcloud-server.html
```{=include=} chapters html:into-file=//demo-nextcloud.html
demo/nextcloud/README.md
```
2 changes: 1 addition & 1 deletion docs/options.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# All Options {#ch-options}
# All Options {#all-options}

```{=include=} options
id-prefix: opt-
Expand Down
1,625 changes: 1,625 additions & 0 deletions docs/redirects.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions modules/blocks/ssl/docs/default.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SSL Generator Block {#ssl-block}
# SSL Generator Block {#block-ssl}

This NixOS module is a block that implements the [SSL certificate generator](contracts-ssl.html) contract.

Expand All @@ -14,7 +14,7 @@ It is implemented by:
[11]: blocks-ssl.html#blocks-ssl-options-shb.certs.certs.selfsigned
[12]: blocks-ssl.html#blocks-ssl-options-shb.certs.certs.letsencrypt

## Self-Signed Certificates {#ssl-block-impl-self-signed}
## Self-Signed Certificates {#block-ssl-impl-self-signed}

Defined in [`/modules/blocks/ssl.nix`](@REPO@/modules/blocks/ssl.nix).

Expand Down Expand Up @@ -52,7 +52,7 @@ shb.certs.certs.selfsigned = {
The group has been chosen to be `nginx` to be consistent with the examples further down in this
document.

## Let's Encrypt {#ssl-block-impl-lets-encrypt}
## Let's Encrypt {#block-ssl-impl-lets-encrypt}

Defined in [`/modules/blocks/ssl.nix`](@REPO@/modules/blocks/ssl.nix).

Expand Down Expand Up @@ -81,7 +81,7 @@ LINODE_TOKEN=XYZ...

For other providers, see the [official instruction](https://go-acme.github.io/lego/dns/).

## Usage {#ssl-block-usage}
## Usage {#block-ssl-usage}

To use either a self-signed certificates or a Let's Encrypt generated one, we can reference the path
where the certificate and the private key are located:
Expand Down Expand Up @@ -110,16 +110,16 @@ config.shb.certs.systemdService
See also the [SSL certificate generator usage](contracts-ssl.html#ssl-contract-usage) for a more detailed usage
example.

## Debug {#ssl-block-debug}
## Debug {#block-ssl-debug}

Each CA and Cert is generated by a systemd service whose name can be seen in the `systemdService`
option. You can then see the latest errors messages using `journalctl`.

## Tests {#ssl-block-tests}
## Tests {#block-ssl-tests}

The self-signed implementation is tested in [`/tests/vm/ssl.nix`](@REPO@/tests/vm/ssl.nix).

## Options Reference {#ssl-block-options}
## Options Reference {#block-ssl-options}

```{=include=} options
id-prefix: blocks-ssl-options-
Expand Down
2 changes: 1 addition & 1 deletion modules/contracts/backup/docs/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ Or with another module `backupservice_2`!
- <!-- [ -->Home Assistant<!--](services-home-assistant.html). --> (no manual yet)
- <!-- [ -->Jellyfin<!--](services-jellyfin.html). --> (no manual yet)
- <!-- [ -->LLDAP<!--](blocks-ldap.html). --> (no manual yet)
- [Nextcloud](services-nextcloud.html#services-nextcloud-server-usage-backup).
- [Nextcloud](services-nextcloud.html#services-nextcloudserver-usage-backup).
- [Vaultwarden](services-vaultwarden.html#services-vaultwarden-backup).
- <!-- [ -->*arr<!--](services-arr.html). --> (no manual yet)
14 changes: 7 additions & 7 deletions modules/contracts/secret/docs/default.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Secret Contract {#secret-contract}
# Secret Contract {#contract-secret}

This NixOS contract represents a secret file
that must be created out of band - from outside the nix store -
Expand All @@ -7,7 +7,7 @@ and that must be placed in an expected location with expected permission.
More formally, this contract is made between a requester module - the one needing a secret -
and a provider module - the one creating the secret and making it available.

## Motivation {#secret-contract-motivation}
## Motivation {#contract-secret-motivation}

Let's provide the [ldap SHB module][ldap-module] option `ldapUserPasswordFile`
with a secret managed by [sops-nix][].
Expand Down Expand Up @@ -68,7 +68,7 @@ shb.sops.secrets."ldap/user_password".request = config.shb.ldap.userPassword.req
shb.ldap.userPassword.result = config.shb.sops.secrets."ldap/user_password".result;
```

## Contract Reference {#secret-contract-options}
## Contract Reference {#contract-secret-options}

These are all the options that are expected to exist for this contract to be respected.

Expand All @@ -78,7 +78,7 @@ list-id: selfhostblocks-options
source: @OPTIONS_JSON@
```

## Usage {#secret-contract-usage}
## Usage {#contract-secret-usage}

A contract involves 3 parties:

Expand All @@ -88,7 +88,7 @@ A contract involves 3 parties:

The usage of this contract is similarly separated into 3 sections.

### Requester Module {#secret-contract-usage-requester}
### Requester Module {#contract-secret-usage-requester}

Here is an example module requesting two secrets through the `secret` contract.

Expand Down Expand Up @@ -128,7 +128,7 @@ in
};
```

### Provider Module {#secret-contract-usage-provider}
### Provider Module {#contract-secret-usage-provider}

Now, on the other side, we have a module that uses those options and provides a secret.
Let's assume such a module is available under the `secretservice` option
Expand Down Expand Up @@ -177,7 +177,7 @@ in
}
```

### End User {#secret-contract-usage-enduser}
### End User {#contract-secret-usage-enduser}

The end user's responsibility is now to do some plumbing.

Expand Down
10 changes: 5 additions & 5 deletions modules/contracts/ssl/docs/default.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# SSL Generator Contract {#ssl-contract}
# SSL Generator Contract {#contract-ssl}

This NixOS contract represents an SSL certificate generator. This contract is used to decouple
generating an SSL certificate from using it. In practice, you can swap generators without updating
modules depending on it.

## Contract Reference {#ssl-contract-options}
## Contract Reference {#contract-ssl-options}

These are all the options that are expected to exist for this contract to be respected.

Expand All @@ -14,7 +14,7 @@ list-id: selfhostblocks-options
source: @OPTIONS_JSON@
```

## Usage {#ssl-contract-usage}
## Usage {#contract-ssl-usage}

Let's assume a module implementing this contract is available under the `ssl` variable:

Expand Down Expand Up @@ -56,11 +56,11 @@ systemd.services.nginx = {
};
```

## Provided Implementations {#ssl-contract-impl-shb}
## Provided Implementations {#contract-ssl-impl-shb}

Multiple implementation are provided out of the box at [SSL block](blocks-ssl.html).

## Custom Implementation {#ssl-contract-impl-custom}
## Custom Implementation {#contract-ssl-impl-custom}

To implement this contract, you must create a module that respects this contract. The following
snippet shows an example.
Expand Down
Loading

0 comments on commit eb66a9b

Please sign in to comment.