this is a continuation of https://discourse.nixos.org/t/can-i-use-flakes-within-a-git-repo-without-committing-flake-nix/18196/37?u=srghma
IF I enable nix flakes
AND I am in the in the git repo
I found the following behavior
IF I do
nix build .
THEN nix will try to find the type of directory.
- IF
./.git
THEN type isgit
- IF
./.something-else-dont-know
THEN type ismercurial
- ...
- IF nothing is found THEN type is
path
but I can force nix to use specific type by using
nix build git+file:.
ornix build path:.
QUESTION:
- what is the difference?
- what is
self-contained
/hermetic evaluation
? git-flake-evaluation
ishermetic
, but ispath-flake-evaluation
hermetic
?- does
nix build git+file:.
have some additional caching, thatnix build path:.
doesnt have? - why not make
nix build .
just equal tonix build path:.
, instead of thisfind type automatically
behavior, described above (Because: what problem its trying to solve? The problem, solutions to which require all these weird behaviors, like unsolicitedgit add
behind the scenes? But I can easily get around/silence it withpath:.
? This design is so weird, reason is so shady)