Nix defines a "lockable HTTP tarball protocol" for flake sources. In summary, if a flake.nix contains something like inputs.abc.url = "https://example.com/abc.tar.gz"; then a Link: <https://example.com/def.tar.gz>; rel="immutable" header in the response will record the latter URL in the flake.lock. This allows efficiently using Git repositories as flake inputs.
See this Forgejo PR for some further information: https://codeberg.org/forgejo/forgejo/pulls/3615
this document looks like a good resource.