Reputation: 5277
For every package I try to install with nix profile, my home-manager install (with flake) seems to be in the way:
❯ hello
The program 'hello' is not in your PATH. It is provided by several packages.
You can make it available in an ephemeral shell by typing one of the following:
nix-shell -p fltk
nix-shell -p fltk14
nix-shell -p haskellPackages.hello
nix-shell -p hello
nix-shell -p mbedtls
~
❯ nix profile install nixpkgs#hello
error: An existing package already provides the following file:
/nix/store/gwyaapg12wpj2gd5chyllg3dmrgq811h-home-manager-path/share/bash-completion/completions/home-manager
This is the conflicting file from the new package:
/nix/store/kfmgvy3vky5s2jcvn7ih354i11l0asmz-home-manager-2021-03-21/share/bash-completion/completions/home-manager
To remove the existing package:
nix profile remove /nix/store/gwyaapg12wpj2gd5chyllg3dmrgq811h-home-manager-path
The new package can also be installed next to the existing one by assigning a different priority.
The conflicting packages have a priority of 5.
To prioritise the new package:
nix profile install /nix/store/kfmgvy3vky5s2jcvn7ih354i11l0asmz-home-manager-2021-03-21 --priority 4
To prioritise the existing package:
nix profile install /nix/store/kfmgvy3vky5s2jcvn7ih354i11l0asmz-home-manager-2021-03-21 --priority 6
Upvotes: 1
Views: 704