Skip to content

Commit

Permalink
uninstaller: fix restoring nix-daemon launchd daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
Enzime committed Nov 11, 2024
1 parent 29f6a5f commit 997f799
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions pkgs/darwin-uninstaller/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ with lib;
launchd.daemons = mkForce {};
launchd.user.agents = mkForce {};

# Don't remove `/Library/LaunchDaemons/org.nixos.nix-daemon.plist`
services.nix-daemon.enable = mkForce false;

# Don't try to reload `nix-daemon`
nix.useDaemon = mkForce false;

system.activationScripts.postUserActivation.text = mkAfter ''
if [[ -L ~/.nix-defexpr/channels/darwin ]]; then
nix-channel --remove darwin || true
Expand Down
4 changes: 3 additions & 1 deletion pkgs/darwin-uninstaller/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ in writeShellApplication {
echo >&2 " - remove /Applications/Nix Apps symlink"
echo >&2 " - cleanup static /etc files"
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 [[ -O /nix/store ]]; then
echo >&2 " - restore nix-daemon service from nix installer as this is a multi-user install"
fi
echo >&2
if [[ -t 0 ]]; then
Expand Down

0 comments on commit 997f799

Please sign in to comment.