Support building flakes from a Git repo url with submodules by timothyklim · Pull Request #5434 · NixOS/nix (original) (raw)

Off by default, but opt-in to use, seems to be the most ideal scenario (and the one implied by this PR), since both backwards-compatability, as well as the functionality if required, is maintained

Well nix-2.4 has not been released yet, so one scenario could also be that before the 2.4 release git-submodules becomes the default with the option to opt-out. IMO disabling submodules is mostly a performance optimization which could be done in different ways. It does however severly impact the UX of the nix command. nix build "git+file://$(pwd)?submodules=1" is not exactly simple to remember.

In #5284 it doesn't seem that edolstra has fundamentally changed his view on submodules ideally being turned on by default, so I'm really uncertain what will be the outcome of all this.