diff options
Diffstat (limited to 'nixos/modules/services')
-rw-r--r-- | nixos/modules/services/monitoring/parsedmarc.xml | 6 | ||||
-rw-r--r-- | nixos/modules/services/networking/mosquitto.xml | 6 | ||||
-rw-r--r-- | nixos/modules/services/search/meilisearch.md | 12 | ||||
-rw-r--r-- | nixos/modules/services/search/meilisearch.xml | 14 | ||||
-rw-r--r-- | nixos/modules/services/web-apps/pict-rs.md | 1 | ||||
-rw-r--r-- | nixos/modules/services/web-apps/pict-rs.xml | 41 |
6 files changed, 34 insertions, 46 deletions
diff --git a/nixos/modules/services/monitoring/parsedmarc.xml b/nixos/modules/services/monitoring/parsedmarc.xml index b6a4bcf8ff5..2db5f48d160 100644 --- a/nixos/modules/services/monitoring/parsedmarc.xml +++ b/nixos/modules/services/monitoring/parsedmarc.xml @@ -15,7 +15,7 @@ email address and saves them to a local Elasticsearch instance looks like this: </para> - <programlisting> + <programlisting language="nix"> services.parsedmarc = { enable = true; settings.imap = { @@ -44,7 +44,7 @@ services.parsedmarc = { email address that should be configured in the domain’s dmarc policy is <literal>dmarc@monitoring.example.com</literal>. </para> - <programlisting> + <programlisting language="nix"> services.parsedmarc = { enable = true; provision = { @@ -67,7 +67,7 @@ services.parsedmarc = { Elasticsearch instance is automatically added as a Grafana datasource, and the dashboard is added to Grafana as well. </para> - <programlisting> + <programlisting language="nix"> services.parsedmarc = { enable = true; provision = { diff --git a/nixos/modules/services/networking/mosquitto.xml b/nixos/modules/services/networking/mosquitto.xml index d16ab28c026..17dc85700f8 100644 --- a/nixos/modules/services/networking/mosquitto.xml +++ b/nixos/modules/services/networking/mosquitto.xml @@ -9,7 +9,7 @@ <para> A minimal configuration for Mosquitto is </para> - <programlisting language="bash"> + <programlisting language="nix"> services.mosquitto = { enable = true; listeners = [ { @@ -31,7 +31,7 @@ services.mosquitto = { restricted write access to a user <literal>service</literal> could look like </para> - <programlisting language="bash"> + <programlisting language="nix"> services.mosquitto = { enable = true; listeners = [ { @@ -52,7 +52,7 @@ services.mosquitto = { TLS authentication is configured by setting TLS-related options of the listener: </para> - <programlisting language="bash"> + <programlisting language="nix"> services.mosquitto = { enable = true; listeners = [ { diff --git a/nixos/modules/services/search/meilisearch.md b/nixos/modules/services/search/meilisearch.md index 98e7c542cb9..98af396117c 100644 --- a/nixos/modules/services/search/meilisearch.md +++ b/nixos/modules/services/search/meilisearch.md @@ -2,7 +2,7 @@ Meilisearch is a lightweight, fast and powerful search engine. Think elastic search with a much smaller footprint. -## Quickstart +## Quickstart {#module-services-meilisearch-quickstart} the minimum to start meilisearch is @@ -14,19 +14,19 @@ this will start the http server included with meilisearch on port 7700. test with `curl -X GET 'http://localhost:7700/health'` -## Usage +## Usage {#module-services-meilisearch-usage} you first need to add documents to an index before you can search for documents. -### Add a documents to the `movies` index +### Add a documents to the `movies` index {#module-services-meilisearch-quickstart-add} `curl -X POST 'http://127.0.0.1:7700/indexes/movies/documents' --data '[{"id": "123", "title": "Superman"}, {"id": 234, "title": "Batman"}]'` -### Search documents in the `movies` index +### Search documents in the `movies` index {#module-services-meilisearch-quickstart-search} `curl 'http://127.0.0.1:7700/indexes/movies/search' --data '{ "q": "botman" }'` (note the typo is intentional and there to demonstrate the typo tolerant capabilities) -## Defaults +## Defaults {#module-services-meilisearch-defaults} - The default nixos package doesn't come with the [dashboard](https://docs.meilisearch.com/learn/getting_started/quick_start.html#search), since the dashboard features makes some assets downloads at compile time. @@ -34,6 +34,6 @@ you first need to add documents to an index before you can search for documents. - Default deployment is development mode. It doesn't require a secret master key. All routes are not protected and accessible. -## Missing +## Missing {#module-services-meilisearch-missing} - the snapshot feature is not yet configurable from the module, it's just a matter of adding the relevant environment variables. diff --git a/nixos/modules/services/search/meilisearch.xml b/nixos/modules/services/search/meilisearch.xml index c1a73f358c2..c222c042562 100644 --- a/nixos/modules/services/search/meilisearch.xml +++ b/nixos/modules/services/search/meilisearch.xml @@ -4,12 +4,12 @@ Meilisearch is a lightweight, fast and powerful search engine. Think elastic search with a much smaller footprint. </para> - <section xml:id="quickstart"> + <section xml:id="module-services-meilisearch-quickstart"> <title>Quickstart</title> <para> the minimum to start meilisearch is </para> - <programlisting language="bash"> + <programlisting language="nix"> services.meilisearch.enable = true; </programlisting> <para> @@ -21,20 +21,20 @@ services.meilisearch.enable = true; <literal>curl -X GET 'http://localhost:7700/health'</literal> </para> </section> - <section xml:id="usage"> + <section xml:id="module-services-meilisearch-usage"> <title>Usage</title> <para> you first need to add documents to an index before you can search for documents. </para> - <section xml:id="add-a-documents-to-the-movies-index"> + <section xml:id="module-services-meilisearch-quickstart-add"> <title>Add a documents to the <literal>movies</literal> index</title> <para> <literal>curl -X POST 'http://127.0.0.1:7700/indexes/movies/documents' --data '[{"id": "123", "title": "Superman"}, {"id": 234, "title": "Batman"}]'</literal> </para> </section> - <section xml:id="search-documents-in-the-movies-index"> + <section xml:id="module-services-meilisearch-quickstart-search"> <title>Search documents in the <literal>movies</literal> index</title> <para> @@ -44,7 +44,7 @@ services.meilisearch.enable = true; </para> </section> </section> - <section xml:id="defaults"> + <section xml:id="module-services-meilisearch-defaults"> <title>Defaults</title> <itemizedlist> <listitem> @@ -70,7 +70,7 @@ services.meilisearch.enable = true; </listitem> </itemizedlist> </section> - <section xml:id="missing"> + <section xml:id="module-services-meilisearch-missing"> <title>Missing</title> <itemizedlist spacing="compact"> <listitem> diff --git a/nixos/modules/services/web-apps/pict-rs.md b/nixos/modules/services/web-apps/pict-rs.md index 4b622049909..2fa6bb3aebc 100644 --- a/nixos/modules/services/web-apps/pict-rs.md +++ b/nixos/modules/services/web-apps/pict-rs.md @@ -15,6 +15,7 @@ this will start the http server on port 8080 by default. ## Usage {#module-services-pict-rs-usage} pict-rs offers the following endpoints: + - `POST /image` for uploading an image. Uploaded content must be valid multipart/form-data with an image array located within the `images[]` key diff --git a/nixos/modules/services/web-apps/pict-rs.xml b/nixos/modules/services/web-apps/pict-rs.xml index bf129f5cc2a..6cae82e01ec 100644 --- a/nixos/modules/services/web-apps/pict-rs.xml +++ b/nixos/modules/services/web-apps/pict-rs.xml @@ -8,7 +8,7 @@ <para> the minimum to start pict-rs is </para> - <programlisting language="bash"> + <programlisting language="nix"> services.pict-rs.enable = true; </programlisting> <para> @@ -18,36 +18,23 @@ services.pict-rs.enable = true; <section xml:id="module-services-pict-rs-usage"> <title>Usage</title> <para> - pict-rs offers the following endpoints: - - <literal>POST /image</literal> for uploading an image. Uploaded - content must be valid multipart/form-data with an image array - located within the <literal>images[]</literal> key + pict-rs offers the following endpoints: </para> - <programlisting> -This endpoint returns the following JSON structure on success with a 201 Created status -```json -{ - "files": [ - { - "delete_token": "JFvFhqJA98", - "file": "lkWZDRvugm.jpg" - }, - { - "delete_token": "kAYy9nk2WK", - "file": "8qFS0QooAn.jpg" - }, - { - "delete_token": "OxRpM3sf0Y", - "file": "1hJaYfGE01.jpg" - } - ], - "msg": "ok" -} -``` -</programlisting> <itemizedlist> <listitem> <para> + <literal>POST /image</literal> for uploading an image. + Uploaded content must be valid multipart/form-data with an + image array located within the <literal>images[]</literal> key + </para> + <para> + This endpoint returns the following JSON structure on success + with a 201 Created status + <literal>json { "files": [ { "delete_token": "JFvFhqJA98", "file": "lkWZDRvugm.jpg" }, { "delete_token": "kAYy9nk2WK", "file": "8qFS0QooAn.jpg" }, { "delete_token": "OxRpM3sf0Y", "file": "1hJaYfGE01.jpg" } ], "msg": "ok" }</literal> + </para> + </listitem> + <listitem> + <para> <literal>GET /image/download?url=...</literal> Download an image from a remote server, returning the same JSON payload as the <literal>POST</literal> endpoint |