mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
uninstaller: fix restoring nix-daemon launchd daemon
This commit is contained in:
parent
6d20de4ed6
commit
e07f08c0dc
2 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,9 @@ with lib;
|
||||||
launchd.daemons = mkForce {};
|
launchd.daemons = mkForce {};
|
||||||
launchd.user.agents = mkForce {};
|
launchd.user.agents = mkForce {};
|
||||||
|
|
||||||
|
# Don't try to reload `nix-daemon`
|
||||||
|
nix.useDaemon = mkForce false;
|
||||||
|
|
||||||
system.activationScripts.postUserActivation.text = mkAfter ''
|
system.activationScripts.postUserActivation.text = mkAfter ''
|
||||||
if [[ -L ~/.nix-defexpr/channels/darwin ]]; then
|
if [[ -L ~/.nix-defexpr/channels/darwin ]]; then
|
||||||
nix-channel --remove darwin || true
|
nix-channel --remove darwin || true
|
||||||
|
|
|
@ -31,7 +31,9 @@ in writeShellApplication {
|
||||||
echo >&2 " - remove /Applications/Nix Apps symlink"
|
echo >&2 " - remove /Applications/Nix Apps symlink"
|
||||||
echo >&2 " - cleanup static /etc files"
|
echo >&2 " - cleanup static /etc files"
|
||||||
echo >&2 " - disable and remove all launchd services managed by nix-darwin"
|
echo >&2 " - disable and remove all launchd services managed by nix-darwin"
|
||||||
echo >&2 " - restore daemon service from nix installer (only when this is a multi-user install)"
|
if [[ $(stat -f '%Su' /nix/store) == "root" ]]; then
|
||||||
|
echo >&2 " - restore nix-daemon service from nix installer as this is a multi-user install"
|
||||||
|
fi
|
||||||
echo >&2
|
echo >&2
|
||||||
|
|
||||||
if [[ -t 0 ]]; then
|
if [[ -t 0 ]]; then
|
||||||
|
|
Loading…
Reference in a new issue