Change KeepAlive from boolean true to SuccessfulExit dictionary in the LaunchAgent configuration. When colima fails to start (e.g., disk already attached), the boolean true setting causes launchd to immediately restart it, spawning orphaned limactl usernet processes with each restart. Using SuccessfulExit = true ensures the service only restarts on clean exits (exit code 0), preventing the aggressive restart loop that accumulates orphaned processes.
30 lines
No EOL
1 KiB
Text
30 lines
No EOL
1 KiB
Text
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
<plist version="1.0">
|
|
<dict>
|
|
<key>EnvironmentVariables</key>
|
|
<dict>
|
|
<key>PATH</key>
|
|
<string>@colima@/bin:@perl@/bin:@docker@/bin:@openssh@/bin:@coreutils@/bin:@curl@/bin:@bashNonInteractive@/bin:@DarwinTools@/bin</string>
|
|
</dict>
|
|
<key>KeepAlive</key>
|
|
<dict>
|
|
<key>SuccessfulExit</key>
|
|
<true/>
|
|
</dict>
|
|
<key>Label</key>
|
|
<string>org.nix-community.home.colima-default</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>/bin/sh</string>
|
|
<string>-c</string>
|
|
<string>/bin/wait4path /nix/store && exec @colima@/bin/colima start default -f '--activate=true' '--save-config=false'</string>
|
|
</array>
|
|
<key>RunAtLoad</key>
|
|
<true/>
|
|
<key>StandardErrorPath</key>
|
|
<string>/home/hm-user/.local/state/colima-default.log</string>
|
|
<key>StandardOutPath</key>
|
|
<string>/home/hm-user/.local/state/colima-default.log</string>
|
|
</dict>
|
|
</plist> |