I'd like to get the root path to the generation / system configuration derivation. Is this path stored somewhere perhaps?

My understanding is that there is a 'derivation' made for your system configuration which in turn has a dependency on other derivations (all the packages etc).


Seems to be this path here /nix/var/nix/profiles/: which a symlink for each generation.

And hence I can use:

nix-store -q --references /nix/var/nix/profiles/system

To list all the derivations my current system config depends on.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.