nix-infra/hosts/ocelot/gotosocial.nix

63 lines
1.5 KiB
Nix
Raw Normal View History

2024-04-20 11:26:44 +00:00
{ ... }:
2024-03-25 19:33:52 +00:00
let
bind-address = "127.0.0.1";
2024-04-20 11:26:44 +00:00
host = "cherrykitten.gay";
2024-03-25 19:33:52 +00:00
port = 8553;
in
{
2024-04-20 11:26:44 +00:00
deployment.keys."gts_env" = {
destDir = "/root/keys/";
keyCommand = [ "pass" "hosts/ocelot/gts/env" ];
user = "gotosocial";
};
2024-03-25 19:33:52 +00:00
services.gotosocial = {
enable = true;
2024-04-01 17:16:35 +00:00
setupPostgresqlDB = true;
2024-04-20 11:26:44 +00:00
environmentFile = "/root/keys/gts_env";
2024-03-25 19:33:52 +00:00
settings = {
inherit bind-address host port;
application-name = "CherryKitten";
landing-page-user = "sammy";
instance-expose-suspended = true;
instance-expose-suspended-web = true;
accounts-registration-open = false;
media-image-max-size = 41943040;
media-video-max-size = 83886080;
media-description-max-chars = 3000;
media-remote-cache-days = 14;
media-emoji-local-max-size = 204800;
media-emoji-remote-max-size = 204800;
statuses-max-chars = 69420;
statuses-cw-max-chars = 200;
statuses-poll-max-options = 10;
statuses-poll-option-max-chars = 150;
statuses-media-max-files = 16;
2024-04-20 11:26:44 +00:00
storage-backend = "s3";
2024-03-25 19:33:52 +00:00
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
2024-04-20 11:26:44 +00:00
clientMaxBodySize = "80M";
2024-03-25 19:33:52 +00:00
virtualHosts = {
"${host}" = {
2024-04-20 11:26:44 +00:00
forceSSL = true;
enableACME = true;
2024-03-25 19:33:52 +00:00
locations = {
"/" = {
recommendedProxySettings = true;
proxyWebsockets = true;
proxyPass = "http://${bind-address}:${toString port}";
};
};
};
};
};
}