Trouble deciding on package to give priority

From the error it seems as if you are trying to install direnv through home-manager, while it is already installed throgh nix-env. Remove the nix-env installed one, then re-reun HM.