fix eval error*2

This commit is contained in:
Charlotte 🦝 Delenk 2022-04-26 07:36:17 +01:00
parent e73e76a932
commit 8b11f2e04c
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122

View file

@ -46,28 +46,34 @@ in
sops.secrets."services/mastodon/vapid/private" = sopsConfig; sops.secrets."services/mastodon/vapid/private" = sopsConfig;
sops.secrets."services/mastodon/vapid/public" = sopsConfig; sops.secrets."services/mastodon/vapid/public" = sopsConfig;
services.nginx.virtualHosts."mastodon.chir.rs" = { services.nginx.virtualHosts =
root = "${config.services.mastodon.package}/public/"; let mastodon = {
sslCertificate = "/var/lib/acme/chir.rs/cert.pem"; root = "${config.services.mastodon.package}/public/";
sslCertificateKey = "/var/lib/acme/chir.rs/key.pem"; locations."/system/".alias = "/var/lib/mastodon/public-system/";
locations."/system/".alias = "/var/lib/mastodon/public-system/";
locations."/" = { locations."/" = {
tryFiles = "$uri @proxy"; tryFiles = "$uri @proxy";
};
locations."@proxy" = {
proxyPass = (if config.services.mastodon.enableUnixSocket then "http://unix:/run/mastodon-web/web.socket" else "http://127.0.0.1:${toString(config.services.mastodon.webPort)}");
proxyWebsockets = true;
};
locations."/api/v1/streaming/" = {
proxyPass = (if config.services.mastodon.enableUnixSocket then "http://unix:/run/mastodon-streaming/streaming.socket" else "http://127.0.0.1:${toString(config.services.mastodon.streamingPort)}/");
proxyWebsockets = true;
};
}; };
locations."@proxy" = { in
proxyPass = (if config.services.mastodon.enableUnixSocket then "http://unix:/run/mastodon-web/web.socket" else "http://127.0.0.1:${toString(config.services.mastodon.webPort)}"); {
proxyWebsockets = true; "mastodon.chir.rs" = mastodon // {
sslCertificate = "/var/lib/acme/chir.rs/cert.pem";
sslCertificateKey = "/var/lib/acme/chir.rs/key.pem";
};
"mastodon.int.chir.rs" = mastodon // {
sslCertificate = "/var/lib/acme/int.chir.rs/cert.pem";
sslCertificateKey = "/var/lib/acme/int.chir.rs/key.pem";
};
}; };
locations."/api/v1/streaming/" = {
proxyPass = (if config.services.mastodon.enableUnixSocket then "http://unix:/run/mastodon-streaming/streaming.socket" else "http://127.0.0.1:${toString(config.services.mastodon.streamingPort)}/");
proxyWebsockets = true;
};
};
services.nginx.virtualHosts."mastodon.int.chir.rs" = config.services.nginx.virtualHosts."mastodon.chir.rs" // {
sslCertificate = "/var/lib/acme/int.chir.rs/cert.pem";
sslCertificateKey = "/var/lib/acme/int.chir.rs/key.pem";
};
services.redis.servers.mastodon = { services.redis.servers.mastodon = {
enable = true; enable = true;
bind = "127.0.0.1"; bind = "127.0.0.1";