2024-07-21 20:40:28 +01:00
|
|
|
{config, ...}: let
|
2024-03-10 17:26:18 +00:00
|
|
|
inherit (config.services.secrets) secrets;
|
2023-09-02 17:42:27 +01:00
|
|
|
in {
|
2023-07-29 16:41:20 +01:00
|
|
|
services.gotosocial = {
|
|
|
|
enable = true;
|
2023-10-02 03:08:24 +01:00
|
|
|
setupPostgresqlDB = false;
|
2024-07-20 12:28:47 +01:00
|
|
|
environmentFile = secrets.gotosocial_env.path;
|
2023-09-02 18:17:03 +01:00
|
|
|
|
2023-07-29 16:41:20 +01:00
|
|
|
settings = {
|
2023-08-20 22:28:18 +01:00
|
|
|
application-name = "chaos-gts";
|
2024-01-25 13:41:33 +00:00
|
|
|
host = "gts-02.owo.monster";
|
2023-07-29 16:41:20 +01:00
|
|
|
bind-address = "0.0.0.0";
|
|
|
|
|
2023-09-02 18:17:03 +01:00
|
|
|
log-level = "info";
|
2023-10-02 03:08:24 +01:00
|
|
|
log-client-ip = true;
|
|
|
|
|
2024-07-20 12:24:27 +01:00
|
|
|
db-type = "sqlite";
|
|
|
|
db-address = "/var/lib/gotosocial/sqlite.db";
|
2023-07-29 16:41:20 +01:00
|
|
|
|
2023-09-02 17:42:27 +01:00
|
|
|
trusted-proxies = [
|
|
|
|
"127.0.0.1/32"
|
|
|
|
"::1"
|
|
|
|
];
|
|
|
|
|
2023-07-29 16:41:20 +01:00
|
|
|
port = 8080;
|
|
|
|
letsencrypt-enabled = false;
|
|
|
|
|
|
|
|
accounts-registration-open = false;
|
|
|
|
|
2023-09-02 18:17:03 +01:00
|
|
|
smtp-host = "mail.owo.monster";
|
|
|
|
smtp-port = 587;
|
2023-11-13 17:49:31 +00:00
|
|
|
smtp-from = "gotosocial@owo.monster";
|
2023-09-02 18:17:03 +01:00
|
|
|
smtp-username = "gotosocial@owo.monster";
|
|
|
|
smtp-password = ""; # set via env variables
|
|
|
|
|
2023-12-20 17:38:38 +00:00
|
|
|
instance-languages = ["en" "de"];
|
2023-08-20 22:28:18 +01:00
|
|
|
|
2024-03-19 16:42:00 +00:00
|
|
|
media-image-max-size = "64MB";
|
|
|
|
media-video-max-size = "1024MB";
|
2023-07-29 16:41:20 +01:00
|
|
|
media-description-max-chars = 4000;
|
2024-03-19 16:42:00 +00:00
|
|
|
media-emoji-local-max-size = "4MB";
|
|
|
|
media-emoji-remote-max-size = "2MB";
|
2023-07-29 16:41:20 +01:00
|
|
|
|
2023-12-03 14:17:15 +00:00
|
|
|
media-remote-cache-days = 1;
|
|
|
|
media-cleanup-every = "6h";
|
|
|
|
|
2023-07-29 16:41:20 +01:00
|
|
|
statuses-poll-max-options = 10;
|
|
|
|
statuses-media-max-files = 8;
|
2023-08-20 22:28:18 +01:00
|
|
|
|
2023-09-30 20:01:59 +01:00
|
|
|
advanced-rate-limit-requests = 0;
|
|
|
|
|
2023-08-20 22:28:18 +01:00
|
|
|
# only enable when testing out mastodon-api applications
|
|
|
|
# that use instance version for api compatibility checks
|
|
|
|
# instance-inject-mastodon-version = true;
|
|
|
|
|
|
|
|
cache = {
|
2024-05-31 12:08:16 +01:00
|
|
|
memory-target = "128MiB";
|
2023-08-20 22:28:18 +01:00
|
|
|
};
|
2023-07-29 16:41:20 +01:00
|
|
|
};
|
|
|
|
};
|
2024-07-20 12:24:27 +01:00
|
|
|
|
|
|
|
services.nginx.virtualHosts."gts-02.owo.monster" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
locations."/" = {
|
|
|
|
proxyPass = "http://127.0.0.1:8080";
|
|
|
|
proxyWebsockets = true;
|
|
|
|
extraConfig = ''
|
|
|
|
# uncomment if running nginx without recommendedProxySettings
|
|
|
|
# proxy_set_header Host $host;
|
|
|
|
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
|
|
# proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
extraConfig = ''
|
|
|
|
client_max_body_size 128M;
|
|
|
|
'';
|
|
|
|
};
|
2023-07-29 16:41:20 +01:00
|
|
|
}
|