mastodon: use nixos' mastodon nginx config
This commit is contained in:
parent
a4474a5f39
commit
9e97c34038
|
@ -23,29 +23,16 @@
|
|||
# echo "${secrets.email.smtp-password}" > $out
|
||||
# ''}";
|
||||
|
||||
extraConfig.WEB_DOMAIN = "c3d2.social";
|
||||
extraConfig = {
|
||||
ALTERNATE_DOMAINS = lib.concatStringsSep "," [
|
||||
"${config.networking.hostName}.serv.zentralwerk.org"
|
||||
];
|
||||
DEFAULT_LOCALE = "de";
|
||||
|
||||
};
|
||||
|
||||
configureNginx = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
virtualHosts."c3d2.social" = {
|
||||
root = "${config.services.mastodon.package}/public/";
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
locations."/system/".alias = "/var/lib/mastodon/public-system/";
|
||||
locations."/".tryFiles = "$uri @proxy";
|
||||
|
||||
locations."@proxy".proxyPass = "http://unix:/run/mastodon-web/web.socket";
|
||||
locations."@proxy".proxyWebsockets = true;
|
||||
|
||||
locations."/api/v1/streaming/".proxyPass = "http://unix:/run/mastodon-streaming/streaming.socket";
|
||||
locations."/api/v1/streaming/".proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.groups.mastodon.members = [ config.services.nginx.user ];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue