home-manager: remove home-manager-path on uninstall

Fixes #1443
This commit is contained in:
Robert Helgesson 2020-08-14 23:19:48 +02:00
parent 9a473b693a
commit 2c6a023744
No known key found for this signature in database
GPG Key ID: 36BDAA14C2797E89
1 changed files with 1 additions and 0 deletions

View File

@ -368,6 +368,7 @@ function doUninstall() {
HOME_MANAGER_CONFIG="$(mktemp --tmpdir home-manager.XXXXXXXXXX)"
echo "{ lib, ... }: { home.file = lib.mkForce {}; }" > "$HOME_MANAGER_CONFIG"
doSwitch
$DRY_RUN_CMD nix-env -e home-manager-path || true
rm "$HOME_MANAGER_CONFIG"
$DRY_RUN_CMD rm $VERBOSE_ARG -r \
"${XDG_DATA_HOME:-$HOME/.local/share}/home-manager"