35 lines
927 B
Nix
35 lines
927 B
Nix
{
|
|
config,
|
|
...
|
|
}: let
|
|
domain = "plausible.jacekpoz.pl";
|
|
in {
|
|
age.secrets = {
|
|
plausible-admin-password.file = ../../../secrets/plausible-admin-password.age;
|
|
plausible-secret-keybase.file = ../../../secrets/plausible-secret-keybase.age;
|
|
};
|
|
|
|
services.plausible = {
|
|
enable = true;
|
|
|
|
adminUser = {
|
|
activate = true;
|
|
name = "afsdjh";
|
|
email = "jacekpoz@proton.me";
|
|
passwordFile = config.age.secrets.plausible-admin-password.path;
|
|
};
|
|
|
|
server = {
|
|
baseUrl = "https://${domain}";
|
|
port = 3987;
|
|
secretKeybaseFile = config.age.secrets.plausible-secret-keybase.path;
|
|
};
|
|
};
|
|
|
|
services.caddy = {
|
|
enable = true;
|
|
virtualHosts.${domain}.extraConfig = ''
|
|
reverse_proxy * localhost:${toString config.services.plausible.server.port}
|
|
'';
|
|
};
|
|
}
|