anchor.diff:        encoding = "utf8";
         pool = cfg.databasePool;
       } // cfg.extraDatabaseConfig;
  +  in if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then {
  +    production.main = val;
  +  } else {
  +    production = val;
     };
   
     # We only want to create a database if we're actually going to connect to it.
  
positive.code:   gitalySocket = "${cfg.statePath}/tmp/sockets/gitaly.socket";
    pathUrlQuote = url: replaceStrings ["/"] ["%2F"] url;
  
    databaseConfig = {
      production = {
        adapter = "postgresql";
        database = cfg.databaseName;
        host = cfg.databaseHost;
  
negative.code:                 fi
  
                  jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \
                     '.${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then "production.main" else "production"}.password = $ENV.db_password' \
                     >'${cfg.statePath}/config/database.yml'
                ''
                else ''
  