1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00

uninstaller: check nix-daemon was correctly reinstalled

This commit is contained in:
Michael Hoang 2024-11-07 14:19:19 +11:00
parent 7bbc7c5db6
commit 3a89b61432

View file

@ -81,12 +81,14 @@ in writeShellApplication {
test -e /etc/static && exit 1 test -e /etc/static && exit 1
echo >&2 "checking /run/current-system" echo >&2 "checking /run/current-system"
test -e /run/current-system && exit 1 test -e /run/current-system && exit 1
echo >&2 "checking nix-daemon service (assuming a multi-user install)" if [[ $(stat -f '%Su' /nix/store) == "root" ]]; then
sudo launchctl list | grep org.nixos.nix-daemon || echo "FIXME? sudo launchctl list | grep org.nixos.nix-daemon" echo >&2 "checking nix-daemon service"
pgrep -l nix-daemon || echo "FIXME? pgrep -l nix-daemon" launchctl print system/org.nixos.nix-daemon
readlink /Library/LaunchDaemons/org.nixos.nix-daemon.plist || echo "FIXME? readlink /Library/LaunchDaemons/org.nixos.nix-daemon.plist" pgrep -l nix-daemon
grep /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /Library/LaunchDaemons/org.nixos.nix-daemon.plist || echo "FIXME? grep /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt /Library/LaunchDaemons/org.nixos.nix-daemon.plist" test -e /Library/LaunchDaemons/org.nixos.nix-daemon.plist
echo >&2 ok [[ "$(shasum -a 256 /Library/LaunchDaemons/org.nixos.nix-daemon.plist | awk '{print $1}')" == "$(shasum -a 256 /Library/LaunchDaemons/org.nixos.nix-daemon.plist | awk '{print $1}')" ]]
echo >&2 ok
fi
''; '';
}; };
} }