mirror of
https://github.com/tuxdotrs/tawm.git
synced 2025-07-06 21:16:35 +05:30
add postgres and plausible
This commit is contained in:
45
modules/nixos/plausible.nix
Normal file
45
modules/nixos/plausible.nix
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
services = {
|
||||
plausible = {
|
||||
enable = true;
|
||||
|
||||
server = {
|
||||
baseUrl = "https://plausible.tux.rs";
|
||||
port = 2100;
|
||||
disableRegistration = true;
|
||||
secretKeybaseFile = config.sops.secrets.plausible_key.path;
|
||||
};
|
||||
|
||||
adminUser = {
|
||||
activate = true;
|
||||
name = "tux";
|
||||
email = "0xtux@pm.me";
|
||||
passwordFile = config.sops.secrets.plausible_password.path;
|
||||
};
|
||||
|
||||
database.postgres = {
|
||||
dbname = "plausible";
|
||||
socket = "/run/postgresql";
|
||||
};
|
||||
};
|
||||
|
||||
nginx = {
|
||||
enable = lib.mkForce true;
|
||||
virtualHosts = {
|
||||
"plausible.tux.rs" = {
|
||||
forceSSL = true;
|
||||
useACMEHost = "tux.rs";
|
||||
locations = {
|
||||
"/" = {
|
||||
proxyPass = "http://localhost:2100";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user