I recently added a package to my home-manager configuration, and on home-manager switch
I get this output:
/nix/store/6670viw5i1jch7bm9iz01qg2d3sj1hzd-home-manager-generation
Starting home manager activation
Activating checkFilesChanged
Activating checkLinkTargets
Activating writeBoundary
Activating installPackages
error: --- Error ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-env
profile '/nix/var/nix/profiles/per-user/roni/profile' is incompatible with 'nix-env'; please use 'nix profile' instead
I believe this started happening after I used nix profile
to install a flake-based package (see this topic for my explorations in that area).
This wiki page explains how to “switch back” to nix-env
after using nix profile
, but the recommendation is to manually intervene in the profile directory on disk, and I don’t want to do that without first understanding how my problem actually originated.
So, my main question is:
- How do I get
home-manager
working again?
And, a bonus question:
- How do I install a flake-based package via
home-manager
?
Thanks!