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:         runConfig = "${cfg.stateDir}/custom/conf/app.ini";
          secretKey = "${cfg.stateDir}/custom/conf/secret_key";
        in ''
          # Make sure that the stateDir exists, as well as the conf dir in there
          mkdir -p ${cfg.stateDir}/conf
  
          # copy custom configuration and generate a random secret key if needed
          ${optionalString (cfg.useWizard == false) ''
            mkdir -p ${cfg.stateDir}/custom/conf
            cp -f ${configFile} ${runConfig}
  
            if [ ! -e ${secretKey} ]; then
  
negative.code:         User = cfg.user;
          Group = "gitea";
          WorkingDirectory = cfg.stateDir;
          ExecStart = "${gitea.bin}/bin/gitea web";
          Restart = "always";
        };
  