I ran into this problem with the Nix Flakes evaluation cache where it always rebuilds a devshell if the git repository is dirty, even though the devshell does not depend on what was edited. Here’s a minimal reproduction of it:
The one workaround I’ve found so far is to move the devshell configuration into it’s own git repository, but this feels a bit extreme. I also tried using nix-direnv, but it rebuilt the shell every time still.
Are there any other workarounds for this issue?