Skip to content

Commit

Permalink
darwin-uninstaller: remove darwin channel from root too
Browse files Browse the repository at this point in the history
  • Loading branch information
emilazy committed Jan 18, 2025
1 parent 87131f5 commit 94adbd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pkgs/darwin-uninstaller/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pkgs/darwin-uninstaller/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 94adbd6

Please sign in to comment.