anchor.diff:          ++ (if cfg.automaticMigrations then [ "mastodon-init-db.service" ] else [ "mastodon-init-dirs.service" ]);
         description = "Mastodon streaming";
         wantedBy = [ "multi-user.target" ];
  -      environment = env // {
  -        PORT = toString(cfg.streamingPort);
  -      };
  +      environment = env // (if cfg.enableUnixSocket
  +        then { SOCKET = "/run/mastodon-streaming/streaming.socket"; }
  +        else { PORT = toString(cfg.streamingPort); }
  +      );
         serviceConfig = {
           ExecStart = "${pkgs.nodejs-slim}/bin/node streaming";
           Restart = "always";
  
positive.code:         '';
          type = lib.types.str;
          default = "127.0.0.1";
        };
  
        redis = {
  
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") { };
  