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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .