colima: fix KeepAlive to prevent process accumulation on macOS

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.
This commit is contained in:
Adam Poit 2026-02-10 12:18:33 -08:00 committed by Austin Horstman
parent 6c4fdbe1ad
commit b3f43db171
2 changed files with 7 additions and 2 deletions

View file

@ -8,7 +8,10 @@
<string>@colima@/bin:@perl@/bin:@docker@/bin:@openssh@/bin:@coreutils@/bin:@curl@/bin:@bashNonInteractive@/bin:@DarwinTools@/bin</string>
</dict>
<key>KeepAlive</key>
<true/>
<dict>
<key>SuccessfulExit</key>
<true/>
</dict>
<key>Label</key>
<string>org.nix-community.home.colima-default</string>
<key>ProgramArguments</key>