nix icon indicating copy to clipboard operation
nix copied to clipboard

`nix profile`: match entries using flake uri

Open bobvanderlinden opened this issue 4 months ago • 0 comments

Currently it is not (practically) possible to match a profile entry using a flake uri. For instance:

$ nix profile install nixpkgs#pulseaudio
$ nix profile remove nixpkgs#pulseaudio
warning: 'nixpkgs#pulseaudio' does not match any packages
warning: Use 'nix profile list' to see the current profile. 

Same goes for upgrade.

It would make sense to be able to remove or upgrade using the same arguments as you'd use for installing:

$ nix profile install nixpkgs#pulseaudio
$ nix profile upgrade nixpkgs#pulseaudio
$ nix profile remove nixpkgs#pulseaudio

One counter-argument to adding such a feature is the recent addition of profile entry names. We can already do the following:

$ nix profile install nixpkgs#pulseaudio
$ nix profile upgrade pulseaudio
$ nix profile remove pulseaudio

It still makes sense to me that the flake uris can still be used, regardless of the named profile entries.

Priorities

Add :+1: to issues you find important.

bobvanderlinden avatar Feb 22 '24 20:02 bobvanderlinden