mastodon: init

This commit is contained in:
nyanloutre 2020-04-08 12:49:45 +02:00
parent 24a9343a20
commit 74b611ded7
2 changed files with 48 additions and 0 deletions

View File

@ -147,6 +147,11 @@
fsType = "zfs";
};
fileSystems."/var/lib/mastodon" =
{ device = "loutrepool/var/mastodon";
fsType = "zfs";
};
swapDevices =
[
{

View File

@ -191,6 +191,34 @@ in
root = "/run/python-ci/nyanloutre/site-max";
};
};
"social.nyanlout.re" = {
enableACME = true;
forceSSL = true;
root = "${config.services.mastodon.package}/public/";
locations."/system/".alias = "/var/lib/mastodon/public-system/";
locations."/" = {
tryFiles = "$uri @proxy";
};
locations."@proxy" = {
proxyPass = "http://127.0.0.1:${toString(config.services.mastodon.webPort)}";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
'';
};
locations."/api/v1/streaming/" = {
proxyPass = "http://127.0.0.1:${toString(config.services.mastodon.streamingPort)}/";
proxyWebsockets = true;
extraConfig = ''
proxy_set_header X-Forwarded-Proto $http_x_forwarded_proto;
'';
};
};
"stream.nyanlout.re" = {
enableACME = true;
forceSSL = true;
@ -286,6 +314,21 @@ in
};
python-ci.enable = true;
mastodon = {
enable = true;
localDomain = "social.nyanlout.re";
extraConfig = {
SMTP_AUTH_METHOD = "none";
SMTP_OPENSSL_VERIFY_MODE = "none";
};
smtp = {
fromAddress = "social@nyanlout.re";
user = "social@nyanlout.re";
authenticate = false;
};
mediaPruneTimer = true;
};
};
systemd.services.site-musique = let