mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-11-15 07:45:29 +03:00
uninstaller: continue if removing channel fails and make nix-daemon reload more robust
Kind of a workaround, but failing to remove the channel isn't a big deal.
This commit is contained in:
parent
75add386d3
commit
803bf18141
@ -19,7 +19,7 @@ with lib;
|
||||
fi
|
||||
|
||||
if test -L ~/.nix-defexpr/channels/darwin; then
|
||||
nix-channel --remove darwin
|
||||
nix-channel --remove darwin || true
|
||||
fi
|
||||
'';
|
||||
|
||||
@ -31,7 +31,7 @@ with lib;
|
||||
if test -O /nix/store; then
|
||||
l=$(readlink /Library/LaunchDaemons/org.nixos.nix-daemon.plist) || true
|
||||
if test "$l" != "/nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist"; then
|
||||
sudo launchctl unload -w /Library/LaunchDaemons/org.nixos.nix-daemon.plist 2> /dev/null || true
|
||||
sudo launchctl remove org.nixos.nix-daemon 2> /dev/null || true
|
||||
sudo ln -sfn /nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist /Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
sudo launchctl load -w /Library/LaunchDaemons/org.nixos.nix-daemon.plist
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user