anchor.diff:    };
   
     config = mkIf cfg.enable {
  -    # Enable redis if no special url is set
  -    services.redis.servers.paperless-ng.enable = mkIf (!hasCustomRedis) true;
  +    services.redis.servers.paperless-ng.enable = mkIf enableRedis true;
   
       systemd.tmpfiles.rules = [
         "d '${cfg.dataDir}' - ${cfg.user} ${config.users.users.${cfg.user}.group} - -"
  
positive.code:           echo "$superuserState" > "$superuserStateFile"
          fi
        '';
      } // optionalAttrs (!hasCustomRedis) {
        after = [ "redis-paperless-ng.service" ];
      };
  
  
negative.code:     GUNICORN_CMD_ARGS = "--bind=${cfg.address}:${toString cfg.port}";
    } // (
      lib.mapAttrs (_: toString) cfg.extraConfig
    ) // (optionalAttrs enableRedis {
      PAPERLESS_REDIS = "unix://${redisServer.unixSocket}";
    });
  
    manage = let
  