add plausible
This commit is contained in:
37
modules/services/plausible.nix
Normal file
37
modules/services/plausible.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user