2024-10-11 10:23:21 +00:00
|
|
|
<template>
|
2024-10-15 08:45:44 +00:00
|
|
|
<pre>
|
2024-10-11 10:23:21 +00:00
|
|
|
{
|
|
|
|
services.gotosocial = {
|
|
|
|
enable = true;
|
|
|
|
setupPostgresqlDB = true;
|
|
|
|
settings = {
|
|
|
|
application-name = "My GoToSocial";
|
|
|
|
host = "gotosocial.example.com";
|
|
|
|
protocol = "https";
|
|
|
|
bind-address = "127.0.0.1";
|
|
|
|
port = 8080;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
{
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
clientMaxBodySize = "40M";
|
|
|
|
virtualHosts = with config.services.gotosocial.settings; {
|
|
|
|
"${host}" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
locations = {
|
|
|
|
"/" = {
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
proxyWebsockets = true;
|
|
|
|
proxyPass = "http://${bind-address}:${toString port}";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
2024-10-15 08:45:44 +00:00
|
|
|
</pre>
|
2024-10-11 10:23:21 +00:00
|
|
|
</template>
|
|
|
|
|