2023-09-02 18:17:03 +01:00
|
|
|
{host_secrets, ...}: let
|
2023-09-02 17:42:27 +01:00
|
|
|
container-addresses = import ../../../data/container-addresses.nix {};
|
|
|
|
hostIP = container-addresses.host;
|
|
|
|
containerIP = container-addresses.containers.social;
|
2023-09-02 18:17:03 +01:00
|
|
|
|
|
|
|
secrets = host_secrets;
|
2023-09-02 17:42:27 +01:00
|
|
|
in {
|
2023-07-29 16:41:20 +01:00
|
|
|
services.gotosocial = {
|
|
|
|
enable = true;
|
|
|
|
setupPostgresqlDB = true;
|
2023-09-11 23:22:18 +01:00
|
|
|
environmentFile = secrets.social_env_secrets.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";
|
2023-07-29 16:41:20 +01:00
|
|
|
host = "gts-01.owo.monster";
|
|
|
|
bind-address = "0.0.0.0";
|
|
|
|
|
2023-09-02 18:17:03 +01:00
|
|
|
log-level = "info";
|
2023-07-29 16:41:20 +01:00
|
|
|
log-client-ip = false;
|
|
|
|
|
2023-09-02 17:42:27 +01:00
|
|
|
trusted-proxies = [
|
|
|
|
"127.0.0.1/32"
|
|
|
|
"::1"
|
|
|
|
hostIP
|
|
|
|
containerIP
|
|
|
|
];
|
|
|
|
|
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;
|
|
|
|
smtp-username = "gotosocial@owo.monster";
|
|
|
|
smtp-password = ""; # set via env variables
|
|
|
|
smtp-from = "gotosocial@owo.monster";
|
|
|
|
|
2023-08-20 22:28:18 +01:00
|
|
|
media-remote-cache-days = 2;
|
|
|
|
|
2023-07-29 16:41:20 +01:00
|
|
|
media-image-max-size = 1000000 * 64; # MB
|
|
|
|
media-video-max-size = 1000000 * 1024; # MB
|
|
|
|
media-description-max-chars = 4000;
|
|
|
|
media-emoji-local-max-size = 102400;
|
|
|
|
media-emoji-remote-max-size = 102400;
|
|
|
|
|
|
|
|
statuses-cw-max-chars = 150;
|
|
|
|
statuses-poll-max-options = 10;
|
|
|
|
statuses-media-max-files = 8;
|
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 = {
|
|
|
|
memory-target = "256MiB";
|
|
|
|
};
|
2023-07-29 16:41:20 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|