So, if I go to an empty directory and run nix flake init
and then nix run
it works as expected. But if I run git init
there and then the flake breaks and nix run
no longer works.
> nix flake init
> nix run
Hello, world!
> git init
> nix run # It broke
error: path '/nix/store/0ccnxa25whszw7mgbgyzdm4nqc0zwnm8-source/flake.nix' does not exist
> rm -rf .git
> nix run # It works again
Hello, world!
Would be great if someone can explain to me the relation between flakes and git and point me to proper documentation (I tried but couldn’t find it). Thanks.