add plausible

This commit is contained in:
Kopatz
2024-06-09 14:15:55 +02:00
parent cb05d6aa18
commit 73858519c6
7 changed files with 55 additions and 1 deletions

View File

@@ -0,0 +1,37 @@
{ config, pkgs, lib, inputs, ... }:
let cfg = config.custom.services.plausible;
in {
options.custom.services.plausible = {
enable = lib.mkEnableOption "Enables plausible";
};
config = lib.mkIf cfg.enable {
age.secrets.plausible-admin = {
file = ../../secrets/plausible-admin.age;
};
age.secrets.plausible-keybase = {
file = ../../secrets/plausible-keybase.age;
};
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 = config.age.secrets.plausible-admin.path;
};
server = {
baseUrl = "https://plausible.imbissaggsbachdorf.at";
#baseUrl = "http://localhost";
# secretKeybaseFile is a path to the file which contains the secret generated
# with openssl as described above.
secretKeybaseFile = config.age.secrets.plausible-keybase.path;
};
};
};
}