Configuring Hydra with Codeberg

I am trying to configure Hydra with Codeberg following the documentation like this:

sops = {
  secrets = {
    codeberg-token = { };
  };

  templates = {
    "codeberg-hydra.conf" = {
      content = ''
        <gitea_authorization>
          gitea_repo_name=nix-config
          gitea_repo_owner=malik
          malik=${config.sops.placeholder.codeberg-token}
          gitea_http_url=https://codeberg.org
        </gitea_authorization>
      '';
      owner = "hydra";
      group = "hydra";
    };
  };
};

services = {
  hydra = {
    enable = true;
    hydraURL = "http://hydra.${config.networking.domain}:${(toString config.services.hydra.port)}"; # externally visible URL
    notificationSender = "hydra@localhost"; # e-mail of Hydra service
    buildMachinesFiles = [];
    useSubstitutes = true;
    extraConfig = ''
      Include ${config.sops.templates."codeberg-hydra.conf".path}
    '';
  };
};

But whenever I don’t comment out services.hydra.extraConfig The hydra service becomes unavailable with nginx bad gateway.

So this means my configuration is propably false, but it still lets me rebuild.