mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2025-12-04 23:00:14 +01:00
chore: adds sample for base plausible install
This commit is contained in:
parent
c72e716710
commit
7c9deda2c7
1 changed files with 35 additions and 0 deletions
35
modules/services/plausible.nix
Normal file
35
modules/services/plausible.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
domain = "statistics.liv.town";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services = {
|
||||||
|
nginx.virtualHosts.${domain} = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.plausible.server.port}";
|
||||||
|
};
|
||||||
|
|
||||||
|
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 = "${config.liv.email}";
|
||||||
|
# passwordFile = config.age.secrets.plausibleAdminPassword.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
server = {
|
||||||
|
baseUrl = "https://${domain}";
|
||||||
|
# secretKeybaseFile = config.age.secrets.plausibleSecretKeybase.path;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue