infrastructure/machines/web01/plausible.nix

56 lines
1.1 KiB
Nix
Raw Normal View History

2023-06-30 18:40:09 +02:00
{ config, ... }:
let
host = "analytics.dgnum.eu";
port = 8111;
in
{
services.plausible = {
enable = true;
mail = {
email = "analytics@infra.dgnum.eu";
2023-07-02 13:31:42 +02:00
2023-06-30 18:40:09 +02:00
smtp = {
user = "web-services@infra.dgnum.eu";
2023-07-02 13:31:42 +02:00
passwordFile = config.age.secrets."_smtp-password-file".path;
2023-06-30 18:40:09 +02:00
hostPort = 465;
hostAddr = "kurisu.lahfa.xyz";
enableSSL = true;
};
};
server = {
baseUrl = "https://${host}";
inherit port;
disableRegistration = false;
2023-06-30 18:40:09 +02:00
secretKeybaseFile = config.age.secrets."plausible_secret-key-base-file".path;
};
releaseCookiePath = config.age.secrets."plausible_release-cookie-file".path;
adminUser = {
passwordFile = config.age.secrets."plausible_admin-user-password-file".path;
email = "tom.hubrecht@dgnum.eu";
name = "thubrecht";
activate = true;
};
};
services.nginx = {
enable = true;
virtualHosts.${host} = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:${builtins.toString port}";
};
};
};
}