mirror of
https://github.com/nix-community/home-manager
synced 2025-02-04 07:15:04 +01:00
home-manager: make sure all files are uninstalled
This forces the `home.file` option to be completely empty when switching to the uninstall configuration. This is necessary to guard against files are added by default in Home Manager, such as `$XDG_CACHE_HOME/.keep`.
This commit is contained in:
parent
7b7499dd70
commit
e1153f4d2e
1 changed files with 1 additions and 1 deletions
|
@ -375,7 +375,7 @@ function doUninstall() {
|
||||||
y|Y)
|
y|Y)
|
||||||
echo "Switching to empty Home Manager configuration..."
|
echo "Switching to empty Home Manager configuration..."
|
||||||
HOME_MANAGER_CONFIG="$(mktemp --tmpdir home-manager.XXXXXXXXXX)"
|
HOME_MANAGER_CONFIG="$(mktemp --tmpdir home-manager.XXXXXXXXXX)"
|
||||||
echo "{}" > "$HOME_MANAGER_CONFIG"
|
echo "{ lib, ... }: { home.file = lib.mkForce {}; }" > "$HOME_MANAGER_CONFIG"
|
||||||
doSwitch
|
doSwitch
|
||||||
rm "$HOME_MANAGER_CONFIG"
|
rm "$HOME_MANAGER_CONFIG"
|
||||||
$DRY_RUN_CMD rm $VERBOSE_ARG -r \
|
$DRY_RUN_CMD rm $VERBOSE_ARG -r \
|
||||||
|
|
Loading…
Add table
Reference in a new issue