more shennanigans

This commit is contained in:
Sakooooo 2025-01-02 16:12:34 +04:00
parent bf51ea0ead
commit 8e9ef37e93
Signed by: sako
GPG key ID: 3FD715D87D7725E0

View file

@ -58,8 +58,9 @@ in {
allow_relay = true; allow_relay = true;
}; };
":media_proxy" = { ":media_proxy" = {
enabled = false; enabled = true;
# base_url = "media.social.sako.lol"; proxy_opts = { redirect_on_failure = true; };
base_url = "media.social.sako.lol/proxy";
}; };
"Pleroma.Web.Endpoint" = { url.host = "social.sako.lol"; }; "Pleroma.Web.Endpoint" = { url.host = "social.sako.lol"; };
"Pleroma.Upload" = { "Pleroma.Upload" = {
@ -73,11 +74,23 @@ in {
}; };
}; };
}; };
nginx.proxyCachePath."akkoma-media-cache" = {
enable = true;
levels = "1:2";
inactive = "720m";
maxSize = "10g";
useTempPath = false;
keysZoneName = "akkoma_media_cache";
keysZoneSize = "10m";
};
nginx.virtualHosts = { nginx.virtualHosts = {
"media.social.sako.lol" = { "media.social.sako.lol" = {
forceSSL = true; forceSSL = true;
enableACME = true; enableACME = true;
locations."/" = { proxyPass = "http://unix:/run/akkoma/socket"; }; locations = {
"/media" = { proxyPass = "http://unix:/run/akkoma/socket"; };
"/proxy" = { proxyPass = "http://unix:/run/akkoma/socket"; };
};
}; };
}; };
}; };