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

View file

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