add wakapi

This commit is contained in:
2024-09-29 10:46:45 +05:30
parent eef2a71a66
commit a627ab558f
4 changed files with 62 additions and 2 deletions

View File

@ -9,6 +9,7 @@
ensureDatabases = [
"plausible"
"wakapi"
];
ensureUsers = [
{
@ -25,6 +26,10 @@
name = "plausible";
ensureDBOwnership = true;
}
{
name = "wakapi";
ensureDBOwnership = true;
}
];
checkConfig = true;

49
modules/nixos/wakapi.nix Normal file
View File

@ -0,0 +1,49 @@
{
lib,
config,
...
}: {
services = {
wakapi = {
enable = true;
passwordSaltFile = config.sops.secrets.wakapi_salt.path;
settings = {
app.avatar_url_template = "https://www.gravatar.com/avatar/{email_hash}.png";
server = {
port = 15999;
public_url = "https://wakapi.tux.rs";
};
db = {
dialect = "postgres";
host = "/run/postgresql";
port = 5432;
name = "wakapi";
user = "wakapi";
};
security = {
allow_signup = false;
disable_frontpage = true;
};
};
};
nginx = {
enable = lib.mkForce true;
virtualHosts = {
"wakapi.tux.rs" = {
forceSSL = true;
useACMEHost = "tux.rs";
locations = {
"/" = {
proxyPass = "http://localhost:15999";
proxyWebsockets = true;
};
};
};
};
};
};
}