You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While debugging a daemon, I removed it with sudo launchctl bootout org.nixos.mydaemon. I expected re-running darwin-rebuild switch would re-add it back, but it does not. It seems that if the unit derivation does not change, the service is assumed to be unchanged and not re-populated: once I made a trivial change to the service definition, switching successfully re-added it.
My expectation is that there is some way to recover the defined launchd state: either doing a simple scan for the presence of services and printing a warning or re-adding if one is missing, or through a flag that forcefully re-bootstraps daemons and agents.
The text was updated successfully, but these errors were encountered:
I've run into an issue with launchd in which it will refuse to start a process that fails on first launch, instead of auto-restarting as it is configured to do. The only fix so far is to completely regenerate the launchd config. Therefore, this becomes an issue even for users who have not tampered with launchctl.
I’ve created #1219 which also includes fixing this issue
@NoRePercussions This is launchd’s default behaviour as far as I’m aware, if a service doesn’t start up correctly (for example if the program doesn’t exist when the service tries to run like if it comes from the Nix Store) then launchd won’t auto restart the unit and you’ll have to bootout and then bootstrap that service
As of #1052 all services defined from nix-darwin that use command or script (but not ProgramArguments) will automatically wait for Nix Store to appear before attempting to run
While debugging a daemon, I removed it with
sudo launchctl bootout org.nixos.mydaemon
. I expected re-runningdarwin-rebuild switch
would re-add it back, but it does not. It seems that if the unit derivation does not change, the service is assumed to be unchanged and not re-populated: once I made a trivial change to the service definition, switching successfully re-added it.My expectation is that there is some way to recover the defined launchd state: either doing a simple scan for the presence of services and printing a warning or re-adding if one is missing, or through a flag that forcefully re-bootstraps daemons and agents.
The text was updated successfully, but these errors were encountered: