anchor.diff:          PrivateTmp = true;
           LogsDirectory = "mastodon";
           StateDirectory = "mastodon";
  +        # Runtime directory and mode
  +        RuntimeDirectory = "mastodon-web";
  +        RuntimeDirectoryMode = "0750";
         };
         path = with pkgs; [ file imagemagick ffmpeg ];
       };
  
positive.code:         };
  
          locations."@proxy" = {
            proxyPass = "http://127.0.0.1:${toString(cfg.webPort)}";
            proxyWebsockets = true;
          };
  
          locations."/api/v1/streaming/" = {
            proxyPass = "http://127.0.0.1:${toString(cfg.streamingPort)}/";
            proxyWebsockets = true;
          };
        };
  
negative.code:         };
        })
        (lib.attrsets.setAttrByPath [ cfg.user "packages" ] [ cfg.package mastodonEnv ])
        (lib.mkIf cfg.configureNginx {${config.services.nginx.user}.extraGroups = [ cfg.user ];})
      ];
  
      users.groups.mastodon = lib.mkIf (cfg.group == "mastodon") { };
  