2023-09-18 03:56:58 +01:00
|
|
|
{
|
|
|
|
hostPath,
|
2023-09-21 05:06:27 +01:00
|
|
|
config,
|
2023-09-18 03:56:58 +01:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
containerAddresses = import "${hostPath}/data/containerAddresses.nix";
|
|
|
|
hostIP = containerAddresses.host;
|
|
|
|
containerIP = containerAddresses.containers.social;
|
2023-09-02 18:17:03 +01:00
|
|
|
|
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;
|
2023-09-21 05:06:27 +01:00
|
|
|
environmentFile = secrets.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";
|
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;
|
|
|
|
|
|
|
|
db-type = "postgres";
|
|
|
|
db-user = "gotosocial";
|
2024-01-25 13:41:33 +00:00
|
|
|
db-database = "gotosocial";
|
|
|
|
db-address = "${containerAddresses.containers.postgresql}";
|
2023-07-29 16:41:20 +01:00
|
|
|
|
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;
|
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 = {
|
2023-11-13 17:49:31 +00:00
|
|
|
memory-target = "512MiB";
|
2023-08-20 22:28:18 +01:00
|
|
|
};
|
2023-07-29 16:41:20 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|