I'm trying to create an archive containing only the store items that were downloaded to build machine A's active system profile, bootstrapped from source with no substitutes. Machine B could be an air gapped system, machine A in the future needing a reinstall without an internet connection, etc. Machine B would be running a minimal guix installation to import that archive to.
Ideally, this archive would not contain any binaries produced by machine A to save space when machine B already contains the necessary tools to consume the archive and bootstrap it. I've been digging around looking for a way to build a complete build dependency and runtime dependency graph of every package and their derivations, but there doesn't appear to be a straightforward way to do it. If such a complete graph could be built, it seems to be only a matter of finding the leaf nodes and exporting those from the store. Am I on the right track?