home-environment: extra message on nix-env error
When profile installation fails during activation we'll print an extra message that explain that, if the error is due to conflicting packages, then it may be that the user has a manually installed copy of the package. Fixes #1244
This commit is contained in:
parent
137a584e22
commit
d57c59e7cb
|
@ -493,7 +493,24 @@ in
|
||||||
''
|
''
|
||||||
else
|
else
|
||||||
''
|
''
|
||||||
$DRY_RUN_CMD nix-env -i ${cfg.path}
|
if ! $DRY_RUN_CMD nix-env -i ${cfg.path} ; then
|
||||||
|
cat <<EOF
|
||||||
|
|
||||||
|
Oops, nix-env failed to install your new Home Manager profile!
|
||||||
|
|
||||||
|
Perhaps there is a conflict with a package that was installed using
|
||||||
|
'nix-env -i'? Try running
|
||||||
|
|
||||||
|
nix-env -q
|
||||||
|
|
||||||
|
and if there is a conflicting package you can remove it with
|
||||||
|
|
||||||
|
nix-env -e {package name}
|
||||||
|
|
||||||
|
Then try activating your Home Manager configuration again.
|
||||||
|
EOF
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue