anchor.diff:      };
   
       systemd.tmpfiles.rules = [
  +      "d '${cfg.stateDir}' - ${cfg.user} gitea - -"
  +      "d '${cfg.stateDir}/conf' - ${cfg.user} gitea - -"
  +      "d '${cfg.stateDir}/custom/conf' - ${cfg.user} gitea - -"
  +      "d '${cfg.repositoryRoot}' - ${cfg.user} gitea - -"
         "Z '${cfg.stateDir}' - ${cfg.user} gitea - -"
  +
  +      # If we have a folder or symlink with gitea locales, remove it
  +      # And symlink the current gitea locales in place
  +      "L+ '${cfg.stateDir}/conf/locale' - - - - ${gitea.out}/locale"
       ];
   
       systemd.services.gitea = {
  
positive.code:           chmod 640 ${runConfig} ${secretKey}
          ''}
  
          mkdir -p ${cfg.repositoryRoot}
          # update all hooks' binary paths
          HOOKS=$(find ${cfg.repositoryRoot} -mindepth 4 -maxdepth 6 -type f -wholename "*git/hooks/*")
          if [ "$HOOKS" ]
  
negative.code:           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
          fi
  
          # update command option in authorized_keys
          if [ -r ${cfg.stateDir}/.ssh/authorized_keys ]
          then
            sed -ri 's,/nix/store/[a-z0-9.-]+/bin/gitea,${gitea.bin}/bin/gitea,g' ${cfg.stateDir}/.ssh/authorized_keys
          fi
        '';
  
        serviceConfig = {
  