mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
02b15d0f5b
* Most significant is probably the patching necessary to run plausible
with postgres without superuser privilege. This change includes:
* updating ecto_sql to 3.6 where `CREATE DATABASE` is only executed if
it doesn't exist[1].
* patching a migration to only modify the `users.email` column (to use
`citext` rather than creating the extension. `plausible-postgres`
takes care of that).
* Correctly declare dependencies in systemd.
* A few minor fixes.
[1] 051baf669e
52 lines
2.3 KiB
XML
52 lines
2.3 KiB
XML
<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>
|
|
<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>
|
|
</para>
|
|
<para>
|
|
After that, <package>plausible</package> can be deployed like this:
|
|
<programlisting>{
|
|
services.plausible = {
|
|
<link linkend="opt-services.plausible.enable">enable</link> = true;
|
|
adminUser = {
|
|
<link linkend="opt-services.plausible.adminUser.activate">activate</link> = true; <co xml:id='ex-plausible-cfg-activate' />
|
|
<link linkend="opt-services.plausible.adminUser.email">email</link> = "admin@localhost";
|
|
<link linkend="opt-services.plausible.adminUser.passwordFile">passwordFile</link> = "/run/secrets/plausible-admin-pwd";
|
|
};
|
|
server = {
|
|
<link linkend="opt-services.plausible.server.baseUrl">baseUrl</link> = "http://analytics.example.org";
|
|
<link linkend="opt-services.plausible.server.secretKeybaseFile">secretKeybaseFile</link> = "/run/secrets/plausible-secret-key-base"; <co xml:id='ex-plausible-cfg-secretbase' />
|
|
};
|
|
};
|
|
}</programlisting>
|
|
<calloutlist>
|
|
<callout arearefs='ex-plausible-cfg-activate'>
|
|
<para>
|
|
<varname>activate</varname> is used to skip the email verification of the admin-user that's
|
|
automatically created by <package>plausible</package>. This is only supported if
|
|
<package>postgresql</package> is configured by the module. This is done by default, but
|
|
can be turned off with <xref linkend="opt-services.plausible.database.postgres.setup" />.
|
|
</para>
|
|
</callout>
|
|
<callout arearefs='ex-plausible-cfg-secretbase'>
|
|
<para>
|
|
<varname>secretKeybaseFile</varname> is a path to the file which contains the secret generated
|
|
with <package>openssl</package> as described above.
|
|
</para>
|
|
</callout>
|
|
</calloutlist>
|
|
</para>
|
|
</section>
|
|
</chapter>
|