nix develop fails when flake.nix is not in source tree:
error: source tree referenced by 'git+file:///Users/...ref=refs/heads/main&rev=d42e1a0ff5cb7ab2a8d512f470bf3c9407765483' does not contain a 'flake.nix' file
This is fine, yes it's not in the source tree. The bug is that nix develop doesn't then detect that there is a flake.nix that's in the right place but hasn't been staged / committed. Good software has good diagnostics - we can be kinder to our users for this very common case.