anchor.diff:          if [ ! -d ${cfg.stateDir}/conf/locale ]
           then
             mkdir -p ${cfg.stateDir}/conf
  -          cp -r ${pkgs.gitea.out}/locale ${cfg.stateDir}/conf/locale
  +          cp -r ${gitea.out}/locale ${cfg.stateDir}/conf/locale
           fi
         '' + optionalString (usePostgresql && cfg.database.createDatabase) ''
           if ! test -e "${cfg.stateDir}/db-created"; then
  
positive.code:         HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 4 -type f -wholename "*git/hooks/*")
          if [ "$HOOKS" ]
          then
            sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${pkgs.gitea.bin}/bin/gitea,g' $HOOKS
            sed -ri 's,/nix/store/[a-z0-9.-]+/bin/env,${pkgs.coreutils}/bin/env,g' $HOOKS
            sed -ri 's,/nix/store/[a-z0-9.-]+/bin/bash,${pkgs.bash}/bin/bash,g' $HOOKS
            sed -ri 's,/nix/store/[a-z0-9.-]+/bin/perl,${pkgs.perl}/bin/perl,g' $HOOKS
  
negative.code: 
  let
    cfg = config.services.gitea;
    gitea = cfg.package;
    pg = config.services.postgresql;
    usePostgresql = cfg.database.type == "postgres";
    configFile = pkgs.writeText "app.ini" ''
  