Nix-shell-locked: tool that starts transient shell with temporary packages that reads flake.lock to determine nixpkgs version

Interesting. My NIX_PATH is simpler:

$ echo $NIX_PATH
nixpkgs=/nix/store/szkschp8grgahp35bg2pqwqmglkq52v5-wsci3as2flp84w6w5gzbyphxzf6ilasd-source

Reading the nixpkgs code a bit, it looks like nixPath turns into a value in environment.sessionVariables, and environment.sessionVariables ends up in /etc/pam/environment. What do you find if you look for NIX_PATH in that file? For example:

$ grep NIX_PATH /etc/pam/environment
NIX_PATH   DEFAULT="nixpkgs=/nix/store/szkschp8grgahp35bg2pqwqmglkq52v5-wsci3as2flp84w6w5gzbyphxzf6ilasd-source"

Or maybe you’ve got something in your shell configuration somewhere that modifies the NIX_PATH env var?