Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstalling fails to delete /Library/LaunchDaemons/org.nixos.nix-daemon.plist, and I'm not sure why it'd try #910

Open
grahamc opened this issue Mar 22, 2024 · 0 comments

Comments

@grahamc
Copy link
Contributor

grahamc commented Mar 22, 2024

In a fresh install of Nix 2.20.5 with the Determinate Nix Installer after just installing nix-darwin, I uninstalled nix-darwin with darwin-uninstall.

It emitted a strange line about deleting nix-daemon.plist:

grahamc@Grahams-MacBook-Pro> darwin-uninstaller

Uninstalling nix-darwin, this will:

    - remove /Applications/Nix Apps symlink
    - cleanup static /etc files
    - disable and remove all launchd services managed by nix-darwin
    - restore daemon service from nix installer (only when this is a multi-user install)

Proceed? [y/n] y
user defaults...
setting up user launchd services...
setting up /Applications/Nix Apps...
setting up pam...
applying patches...
setting up /etc...
system defaults...
setting up launchd services...
removing service org.nixos.activate-system
removing service org.nixos.nix-daemon
configuring networking...
setting nvram variables...
rm: cannot remove '/Library/LaunchDaemons/org.nixos.nix-daemon.plist': No such file or directory

-- is this intentional? I'd expect it to not try to delete this at all. Even stranger, that file definitely does exist:

grahamc@Grahams-MacBook-Pro> cat /Library/LaunchDaemons/org.nixos.nix-daemon.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>EnvironmentVariables</key>
    <dict>
      <key>OBJC_DISABLE_INITIALIZE_FORK_SAFETY</key>
      <string>YES</string>
    </dict>
    <key>Label</key>
    <string>org.nixos.nix-daemon</string>
    <key>KeepAlive</key>
    <true/>
    <key>RunAtLoad</key>
    <true/>
    <key>ProgramArguments</key>
    <array>
      <string>/bin/sh</string>
      <string>-c</string>
      <string>/bin/wait4path /nix/var/nix/profiles/default/bin/nix-daemon &amp;&amp; exec /nix/var/nix/profiles/default/bin/nix-daemon</string>
    </array>
    <key>StandardErrorPath</key>
    <string>/var/log/nix-daemon.log</string>
    <key>StandardOutPath</key>
    <string>/dev/null</string>
    <key>SoftResourceLimits</key>
    <dict>
      <key>NumberOfFiles</key>
      <integer>1048576</integer>
    </dict>
  </dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant