···11+# Plausible {#module-services-plausible}
22+33+[Plausible](https://plausible.io/) is a privacy-friendly alternative to
44+Google analytics.
55+66+## Basic Usage {#module-services-plausible-basic-usage}
77+88+At first, a secret key is needed to be generated. This can be done with e.g.
99+```ShellSession
1010+$ openssl rand -base64 64
1111+```
1212+1313+After that, `plausible` can be deployed like this:
1414+```
1515+{
1616+ services.plausible = {
1717+ enable = true;
1818+ adminUser = {
1919+ # activate is used to skip the email verification of the admin-user that's
2020+ # automatically created by plausible. This is only supported if
2121+ # postgresql is configured by the module. This is done by default, but
2222+ # can be turned off with services.plausible.database.postgres.setup.
2323+ activate = true;
2424+ email = "admin@localhost";
2525+ passwordFile = "/run/secrets/plausible-admin-pwd";
2626+ };
2727+ server = {
2828+ baseUrl = "http://analytics.example.org";
2929+ # secretKeybaseFile is a path to the file which contains the secret generated
3030+ # with openssl as described above.
3131+ secretKeybaseFile = "/run/secrets/plausible-secret-key-base";
3232+ };
3333+ };
3434+}
3535+```
+2
nixos/modules/services/web-apps/plausible.nix
···292292 };
293293294294 meta.maintainers = with maintainers; [ ma27 ];
295295+ # Don't edit the docbook xml directly, edit the md and generate it:
296296+ # `pandoc plausible.md -t docbook --top-level-division=chapter --extract-media=media -f markdown-smart --lua-filter ../../../../doc/build-aux/pandoc-filters/myst-reader/roles.lua --lua-filter ../../../../doc/build-aux/pandoc-filters/docbook-writer/rst-roles.lua > plausible.xml`
295297 meta.doc = ./plausible.xml;
296298}
+23-23
nixos/modules/services/web-apps/plausible.xml
···11-<chapter xmlns="http://docbook.org/ns/docbook"
22- xmlns:xlink="http://www.w3.org/1999/xlink"
33- xmlns:xi="http://www.w3.org/2001/XInclude"
44- version="5.0"
55- xml:id="module-services-plausible">
66- <title>Plausible</title>
77- <para>
88- <link xlink:href="https://plausible.io/">Plausible</link> is a privacy-friendly alternative to
99- Google analytics.
1010- </para>
1111- <section xml:id="module-services-plausible-basic-usage">
1212- <title>Basic Usage</title>
11+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-plausible">
22+ <title>Plausible</title>
133 <para>
1414- At first, a secret key is needed to be generated. This can be done with e.g.
1515- <screen><prompt>$ </prompt>openssl rand -base64 64</screen>
44+ <link xlink:href="https://plausible.io/">Plausible</link> is a
55+ privacy-friendly alternative to Google analytics.
166 </para>
1717- <para>
1818- After that, <literal>plausible</literal> can be deployed like this:
1919-<programlisting>
77+ <section xml:id="module-services-plausible-basic-usage">
88+ <title>Basic Usage</title>
99+ <para>
1010+ At first, a secret key is needed to be generated. This can be done
1111+ with e.g.
1212+ </para>
1313+ <programlisting>
1414+$ openssl rand -base64 64
1515+</programlisting>
1616+ <para>
1717+ After that, <literal>plausible</literal> can be deployed like
1818+ this:
1919+ </para>
2020+ <programlisting>
2021{
2122 services.plausible = {
2223 enable = true;
···2627 # postgresql is configured by the module. This is done by default, but
2728 # can be turned off with services.plausible.database.postgres.setup.
2829 activate = true;
2929- email = "admin@localhost";
3030- passwordFile = "/run/secrets/plausible-admin-pwd";
3030+ email = "admin@localhost";
3131+ passwordFile = "/run/secrets/plausible-admin-pwd";
3132 };
3233 server = {
3333- baseUrl = "http://analytics.example.org";
3434+ baseUrl = "http://analytics.example.org";
3435 # secretKeybaseFile is a path to the file which contains the secret generated
3536 # with openssl as described above.
3636- secretKeybaseFile = "/run/secrets/plausible-secret-key-base";
3737+ secretKeybaseFile = "/run/secrets/plausible-secret-key-base";
3738 };
3839 };
3940}
4041</programlisting>
4141- </para>
4242- </section>
4242+ </section>
4343</chapter>