I’ve encountered something that looks like a bug to me. In a flake A I reference a private flake B on github, so I use export NIX_CONFIG=“access-tokens = github.com/name=$(gh auth token --user name)” to have access to it when building or locking. That has worked fine for a long time.
That of course requires that at some point you did gh auth login and the default git_protocol is https, which is what I used. I have to admit I’m not fully sure which part is affected with this setting, but I recently switched to ssh for the git_protocol in the gh settings. Mainly because I wanted stuff I gh repo clone … to have remotes that use the ssh protocol, that authentication scheme is easier for me to set up.
This seems to have the side effect that when I try to lock that flake A I get different narHashes for the same commit of flake B, depending on whether my gh git_protocol is configured as ssh or https, but still both nix store paths land in the same place, so once that happens I’m quite stuck.
Sharing a flake A between two machines that are setup with different git_protocols is impossible, they each want to update the lock file in a manner that the other one won’t work with.
Both machines use the same case-sensitive file system.
Do you think that is correct behaviour? Should the narHash of github flakes not be independent of the protocol used?