mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-05 02:23:07 +03:00
nixos/plausible: convert manual chapter to MD
This commit is contained in:
parent
42ea3f2699
commit
1bb00a9c12
35
nixos/modules/services/web-apps/plausible.md
Normal file
35
nixos/modules/services/web-apps/plausible.md
Normal file
@ -0,0 +1,35 @@
|
||||
# Plausible {#module-services-plausible}
|
||||
|
||||
[Plausible](https://plausible.io/) is a privacy-friendly alternative to
|
||||
Google analytics.
|
||||
|
||||
## Basic Usage {#module-services-plausible-basic-usage}
|
||||
|
||||
At first, a secret key is needed to be generated. This can be done with e.g.
|
||||
```ShellSession
|
||||
$ openssl rand -base64 64
|
||||
```
|
||||
|
||||
After that, `plausible` can be deployed like this:
|
||||
```
|
||||
{
|
||||
services.plausible = {
|
||||
enable = true;
|
||||
adminUser = {
|
||||
# activate is used to skip the email verification of the admin-user that's
|
||||
# automatically created by plausible. This is only supported if
|
||||
# postgresql is configured by the module. This is done by default, but
|
||||
# can be turned off with services.plausible.database.postgres.setup.
|
||||
activate = true;
|
||||
email = "admin@localhost";
|
||||
passwordFile = "/run/secrets/plausible-admin-pwd";
|
||||
};
|
||||
server = {
|
||||
baseUrl = "http://analytics.example.org";
|
||||
# secretKeybaseFile is a path to the file which contains the secret generated
|
||||
# with openssl as described above.
|
||||
secretKeybaseFile = "/run/secrets/plausible-secret-key-base";
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
@ -292,5 +292,7 @@ in {
|
||||
};
|
||||
|
||||
meta.maintainers = with maintainers; [ ma27 ];
|
||||
# Don't edit the docbook xml directly, edit the md and generate it:
|
||||
# `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`
|
||||
meta.doc = ./plausible.xml;
|
||||
}
|
||||
|
@ -1,22 +1,23 @@
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude"
|
||||
version="5.0"
|
||||
xml:id="module-services-plausible">
|
||||
<title>Plausible</title>
|
||||
<para>
|
||||
<link xlink:href="https://plausible.io/">Plausible</link> is a privacy-friendly alternative to
|
||||
Google analytics.
|
||||
</para>
|
||||
<section xml:id="module-services-plausible-basic-usage">
|
||||
<title>Basic Usage</title>
|
||||
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-plausible">
|
||||
<title>Plausible</title>
|
||||
<para>
|
||||
At first, a secret key is needed to be generated. This can be done with e.g.
|
||||
<screen><prompt>$ </prompt>openssl rand -base64 64</screen>
|
||||
<link xlink:href="https://plausible.io/">Plausible</link> is a
|
||||
privacy-friendly alternative to Google analytics.
|
||||
</para>
|
||||
<para>
|
||||
After that, <literal>plausible</literal> can be deployed like this:
|
||||
<programlisting>
|
||||
<section xml:id="module-services-plausible-basic-usage">
|
||||
<title>Basic Usage</title>
|
||||
<para>
|
||||
At first, a secret key is needed to be generated. This can be done
|
||||
with e.g.
|
||||
</para>
|
||||
<programlisting>
|
||||
$ openssl rand -base64 64
|
||||
</programlisting>
|
||||
<para>
|
||||
After that, <literal>plausible</literal> can be deployed like
|
||||
this:
|
||||
</para>
|
||||
<programlisting>
|
||||
{
|
||||
services.plausible = {
|
||||
enable = true;
|
||||
@ -26,18 +27,17 @@
|
||||
# postgresql is configured by the module. This is done by default, but
|
||||
# can be turned off with services.plausible.database.postgres.setup.
|
||||
activate = true;
|
||||
email = "admin@localhost";
|
||||
passwordFile = "/run/secrets/plausible-admin-pwd";
|
||||
email = "admin@localhost";
|
||||
passwordFile = "/run/secrets/plausible-admin-pwd";
|
||||
};
|
||||
server = {
|
||||
baseUrl = "http://analytics.example.org";
|
||||
baseUrl = "http://analytics.example.org";
|
||||
# secretKeybaseFile is a path to the file which contains the secret generated
|
||||
# with openssl as described above.
|
||||
secretKeybaseFile = "/run/secrets/plausible-secret-key-base";
|
||||
secretKeybaseFile = "/run/secrets/plausible-secret-key-base";
|
||||
};
|
||||
};
|
||||
}
|
||||
</programlisting>
|
||||
</para>
|
||||
</section>
|
||||
</section>
|
||||
</chapter>
|
||||
|
Loading…
Reference in New Issue
Block a user