Is there a command that can be used to figure out which packages are installed system-wide in NixOS?
For instance, I can list packages installed for my current user with nix-env -q
. I don't know of any way to list packages installed on the whole system from /etx/nixos/configuration.nix
.
There are two separate instances I would want to use this:
Let's say I add a package to
/etc/nixos/configuration.nix
inenvironment.systemPackages
, but I forget whether I have runnixos-rebuild switch
yet. It would be nice if there was a command I could run to check whether the package is in the system environment.I have
programs.bash.enableCompletion
set totrue
in/etc/nixos/configuration.nix
. Without looking at the option in nixpkgs, I would guess that this option would set thebash-completion
package to be installed. It would be nice if there was a command that I could run that checked whether thebash-completion
package actually was in the system environment.