Skip to content

nix profile: match entries using flake uri #10064

@bobvanderlinden

Description

@bobvanderlinden

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.

Additional context

Part of #7966

Priorities

Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions