2.home-manager/tests/modules/services/colima/darwin/expected-agent.plist
Adam Poit b3f43db171 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.
2026-02-10 21:19:55 -06:00

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 &amp;&amp; exec @colima@/bin/colima start default -f &apos;--activate=true&apos; &apos;--save-config=false&apos;</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>