Can’t be done, pure eval explicitly prohibits accessing the repo path on disk for build/eval reproducibility.
If you could access it, copying the config to another directory would potentially result in a different build output with no code changes. In fact, that’s exactly what you’re trying to do, and nix is preventing a reproducibility issue for you.
You need to hardcode the path, but look at it this way, the configuration location becomes a fundamental part of the system configuration if you’re going to use a local directory to update from, so in effect it kinda has to be hardcoded. You need to run at least one rebuild to change the path if you do want to move the configuration anyway.
You could create an option or variable for it if you wanted to vary the location on different systems.