darwin-uninstaller: remove darwin channel from root too

This commit is contained in:
Emily 2025-01-13 23:21:04 +00:00
parent 87131f51f8
commit 94adbd6259
2 changed files with 4 additions and 4 deletions

View file

@ -16,12 +16,12 @@ with lib;
nix.useDaemon = mkForce false;
system.activationScripts.postUserActivation.text = mkAfter ''
if [[ -L ~/.nix-defexpr/channels/darwin ]]; then
nix-channel --remove darwin || true
fi
nix-channel --remove darwin || true
'';
system.activationScripts.postActivation.text = mkAfter ''
nix-channel --remove darwin || true
if [[ -L /Applications/Nix\ Apps ]]; then
rm /Applications/Nix\ Apps
fi

View file

@ -77,7 +77,7 @@ in writeShellApplication {
echo >&2
echo >&2 "checking darwin channel"
test -e ~/.nix-defexpr/channels/darwin && exit 1
nix-instantiate --find-file darwin && exit 1
echo >&2 "checking /etc"
test -e /etc/static && exit 1
echo >&2 "checking /run/current-system"