infrastructure/machines/compute01/plausible.nix
Tom Hubrecht f065db687a
Some checks failed
Check meta / check_meta (push) Successful in 27s
Check meta / check_dns (push) Successful in 48s
build configuration / build_vault01 (push) Successful in 1m12s
build configuration / build_storage01 (push) Failing after 1m12s
build configuration / build_web01 (push) Failing after 46s
build configuration / build_compute01 (push) Successful in 1m17s
lint / check (push) Successful in 25s
build configuration / build_web02 (push) Successful in 51s
build configuration / build_rescue01 (push) Successful in 50s
build configuration / push_to_cache (push) Has been skipped
feat(plausible): Transfer from web01 to compute01
2024-04-21 21:50:01 +02:00

53 lines
1 KiB
Nix

{ config, ... }:
let
host = "analytics.dgnum.eu";
port = 8111;
in
{
services.plausible = {
enable = true;
mail = {
email = "analytics@infra.dgnum.eu";
smtp = {
user = "web-services@infra.dgnum.eu";
passwordFile = config.age.secrets."plausible-smtp_password_file".path;
hostPort = 465;
hostAddr = "kurisu.lahfa.xyz";
enableSSL = true;
};
};
server = {
baseUrl = "https://${host}";
inherit port;
disableRegistration = false;
secretKeybaseFile = config.age.secrets."plausible-secret_key_base_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}";
};
};
};
}