I'm trying to debug an issue where a nixos configuration on one machine, has the an application accessible in the path (it's listed in /run/current-system/sw/bin), while on another machine with the same nixos configuration (minus hardware-configuration.nix etc), it does not.

How can I query all the store paths for a Nixos generation? This will help me debug the issue by comparing these it between machines.

1 Answer 1

nix-build -E "(import <nixpkgs/nixos> { configuration = /etc/nixos/configuration.nix; }).system"

This will build and output the store path, though it's limited to the current build generation.

And then one can use nix-store -q --tree /nix/store/...example-path-19.09 which print a tree like output of all the paths. Or nix-store -q -R /nix/store/...example-path-19.09 for a simple list.

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.