Description
Is your feature request related to a problem? Please describe.
Currently nix profile list
doesn't show the priority
of the installed package. I need to check the currently selected profile's manifest.json
to know the full picture. Other than this the listing has the same info as the manifest with the addition of index numbers which in the case of the manifest I need to manually derive by counting the position in the elements
array.
Knowing the index number helps me to remove the precise entry I want with nix profile remove <n>
. However I could have a binary with the same name installed with different priorities. E.g. multiple versions of jq
might be installed with priorities 1
, 2
, 5
, 8
etc. The currently used one would then be the jq
with highest priority which is 1
in this example. However if I want to remove the jq
that I had assigned the priority 5
, I cannot do so simply by looking at the output of nix profile list
as it gives me the index number but not the priority. OTOH, looking at the manifest.json
gives me the priorities but not the index numbers (though I can trivially count their position in the JSON
array). This mean in order to do this task, I need to look up both places, one to get the priority (and maybe the lock-hash) and then find the index corresponding to that in the other. Only then I can do nix profile remove <index-of-jq-with-priority-5>
.
I don't see why we cannot just have the priority too in nix profile list
.
Describe the solution you'd like
nix profile list
should also give the priority of the installed packages. Then it'll be almost similar to the info from manifest.json
which I suppose should just be an impl detail and not something the user should consult ordinarily.
Additional context
nix version 2.19.2
Add 👍 to issues you find important.