nix registry pin: Mark the resulting registry entry as exact
Motivation
Since the resulting target flakeref contains attributes like lastModified or narHash, it's not suitable for overriding. This led to errors like
$ nix build nixpkgs/24.05#hello
error: 'lastModified' attribute mismatch in input 'github:NixOS/nixpkgs/63dacb46bf939521bdc93981b4cbb7ecb58427a0', expected 1728538411, got 1717179513
after doing nix registry pin nixpkgs.
Context
Add :+1: to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.
What is exact? It's not documented in the manual or on the C++ field.
It means that the registry entry is only used to rewrite the given flakeref if it's exactly equal to the from of the entry. This is useful if you have a registry entry like nixpkgs -> path:/nix/store/... that should match nixpkgs but not e.g. nixpkgs/<branch>. See https://github.com/NixOS/nixpkgs/blob/22d52eb36183414bc4e0dc17ed19955c4988d931/nixos/modules/config/nix-flakes.nix#L68-L76.
Added a test in https://github.com/NixOS/nix/pull/13229