So after playing around a bit, I’m still confused…
What definitely works without altering the flake at ./a/b is using the following url in ./c/flake.nix:
git+file:///abs/path?dir=a/b
However, as soon as I try to get rid of the absolute path, I have problems:
git+file://..?dir=a/b file+file://..?dir=a/b
both fail due to file: only accepting absolute paths (“has unexpected authority ‘…’”).
path:..?dir=a/b
fails because path apparently doesn’t like the dir paramter (“has unsupported parameter ‘dir’”)
..?dir=a/b
is highly confusing. The nix manual suggests this should be the right one to use (" If the directory is part of a Git repository, then the input will be treated as a git+file: URL"), but the dir parameter appears to be silently ignored, i.e. the flake in the root folder of the git repo is being used.
I’m gonna try to put together a minimal example of the issue.
[edit] Meanwhile based on this discussion I tried git+file:..?dir=a/b but got "could not find HEAD ref from repo at ‘file:…’ using ‘master’.