Is this a bug for flake?

first run
nixos-rebuild switch --flake . --impure --show-trace
it work.
When I add a new folder or file to the project directory and add ingestion to the config, the command prompt can’t find the file, then I try to reinstall the system again, and it’s OK again… Is there some other option blocking it?
This error does not occur when using the home-manager switch command. But the configuration disappears after rebooting the system, so now I have to execute this command every time I boot up to the desktop.

Not sure if that’s your issue, but if your directory is versioned with git new files will be ignored, you need to stage them before rebuild: git add .

this error maybe in cache.i change source local to git repo.

I gave up on this caching problem, I don’t want to use git repositories because there are some problems with access to several git repositories in Chinese mainland