This repository has been archived on 2024-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
nixos/modules/plausible.nix
2023-12-14 20:09:34 +05:30

58 lines
1.3 KiB
Nix

{ ... }:
{
services = {
plausible = {
enable = false;
server = {
secretKeybaseFile = "/run/agenix/enterprise-nix-cache-key-sec";
disableRegistration = true;
port = 13231;
baseUrl = "https://analytics.bhankas.org";
};
adminUser = {
activate = true;
name = "root";
email = "admin@bhankas.org";
passwordFile = "/run/agenix/maildir_relekarpayas_onedrive";
};
database = {
clickhouse.setup = true;
};
mail = {
email = "gandalf@bhankas.org";
smtp = {
enableSSL = true;
hostAddr = "smtp.purelymail.com";
hostPort = 587;
passwordFile = "/run/agenix/gandalf_mail";
user = "gandalf@bhankas.org";
};
};
};
nginx = {
virtualHosts = {
"analytics.bhankas.org" = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://127.0.0.1:13231";
proxyWebsockets = false;
extraConfig =
"proxy_set_header Host $host;"
;
};
};
};
};
};
security.acme = {
certs = {
"analytics.bhankas.org" = {
email = "admin@bhankas.org";
dnsResolver = "1.1.1.1:53";
};
};
};
}