summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-10-13 17:36:16 +0200
committerSoispha <soispha@vhack.eu>2023-10-13 17:36:16 +0200
commit925e9936646bf071f6de271c8f17727e2ab86616 (patch)
tree8e0ea76f4a4303d4623de8bf4ab8b4aeb0f435f9
parentRevert "fix(system/services/mastodon): remove unneccessary stringcasts" (diff)
downloadnixos-server-925e9936646bf071f6de271c8f17727e2ab86616.zip
fix(system/services/mastodon): Correctly avoid string casts
-rw-r--r--system/services/mastodon/default.nix30
1 files changed, 14 insertions, 16 deletions
diff --git a/system/services/mastodon/default.nix b/system/services/mastodon/default.nix
index fee472e..39a0f56 100644
--- a/system/services/mastodon/default.nix
+++ b/system/services/mastodon/default.nix
@@ -10,7 +10,7 @@ in {
fromAddress = emailAddress;
user = emailAddress;
host = "server1.vhack.eu";
- passwordFile = "${config.age.secrets.mastodonMail.path}";
+ passwordFile = config.age.secrets.mastodonMail.path;
};
extraConfig = {
WEB_DOMAIN = "mastodon.vhack.eu";
@@ -22,28 +22,26 @@ in {
enable = true;
recommendedProxySettings = true; # required for redirections to work
virtualHosts = {
- "${config.services.mastodon.extraConfig.WEB_DOMAIN}" = {
+ ${config.services.mastodon.extraConfig.WEB_DOMAIN} = {
root = "${config.services.mastodon.package}/public/";
# mastodon only supports https, but you can override this if you offload tls elsewhere.
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";
- proxyWebsockets = true;
- };
-
- locations."/api/v1/streaming/" = {
- proxyPass = "http://unix:/run/mastodon-streaming/streaming.socket";
- proxyWebsockets = true;
+ locations = {
+ "/system/".alias = "/var/lib/mastodon/public-system/";
+ "/".tryFiles = "$uri @proxy";
+ "@proxy" = {
+ proxyPass = "http://unix:/run/mastodon-web/web.socket";
+ proxyWebsockets = true;
+ };
+ "/api/v1/streaming/" = {
+ proxyPass = "http://unix:/run/mastodon-streaming/streaming.socket";
+ proxyWebsockets = true;
+ };
};
};
+
"vhack.eu" = {
locations."/.well-known/webfinger".return = "301 https://${config.services.mastodon.extraConfig.WEB_DOMAIN}$request_uri";
};