if you using nixos unstable, then you get what get, which is an unstable , a constantly changing set of code/derivations/packages
However, if you wait for a ‘release’, then you can always reference the release notes, then
https://nixos.org/manual/nixos/stable/release-notes.html
https://nixos.org/manual/nixos/stable/release-notes.html#sec-release-21.11
These are pretty good and high quality, compiled from various source including info from git log
and manually by amazing release managers (past , previous and future) and have some of the information you need.
On unstable , things are a bit more chaotic. as @alexv says, dry-build will show you paths, however , if you always think of system as a ‘git checkout of nixpkgs’, then you can do something like this for the package cowsay, (a very important package).
git clone https://github.com/NixOS/nixpkgs.git
<git checkout the commit you upgrading too>
cd nixpkgs/pkgs/tools/misc/cowsay
git log .
for modules something like
git log nixpkgs/nixos/modules/services/web-servers/darkhttpd.nix
which will basically give you all the commits related to the directory (the derivation or the package if you want to think of it that way).
you could probably use this method for modules etc etc, as long as the commit messages are descriptive, or they have links to the original pull request and related discussion around it.
There maybe better ways to do this, and i’m sure there a nix tool out there, or a nixer who knows a better way…
it would not be a massive job, to find out what dry-run is rebuilding, from source commit to upgrade commit, and pull the relevant metadata and show the relevant git logs for those derivations.
Another thought i had, you can use git (or maybe the github api) to find the original PR request for commits to derivations or nix code your interested in, thus you should be able to find the github PR , and the sometimes gargantuan discussions that go on over there! You can gleam a lot of data on why things the way they are in nix.
However, that exercise is left to the reader, because i’m so busy i need to hire nix people! so if you love nix, and want to work with it all day, everyday…DM’s accepted.