home-manager: set state version when uninstalling
Otherwise the switch exits with an error. Fixes #3320
This commit is contained in:
parent
e1f1160284
commit
ebe6d2c747
|
@ -480,7 +480,10 @@ function doUninstall() {
|
||||||
y|Y)
|
y|Y)
|
||||||
_i "Switching to empty Home Manager configuration..."
|
_i "Switching to empty Home Manager configuration..."
|
||||||
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_MANAGER_CONFIG"
|
||||||
|
echo " home.file = lib.mkForce {};" >> "$HOME_MANAGER_CONFIG"
|
||||||
|
echo " home.stateVersion = \"18.09\";" >> "$HOME_MANAGER_CONFIG"
|
||||||
|
echo "}" >> "$HOME_MANAGER_CONFIG"
|
||||||
doSwitch
|
doSwitch
|
||||||
$DRY_RUN_CMD $REMOVE_CMD home-manager-path || true
|
$DRY_RUN_CMD $REMOVE_CMD home-manager-path || true
|
||||||
rm "$HOME_MANAGER_CONFIG"
|
rm "$HOME_MANAGER_CONFIG"
|
||||||
|
|
Loading…
Reference in a new issue