On Darwin, launchd may attempt to start agents before the Nix store is mounted and available. This leads to failures when the agent's executable or arguments reside in the Nix store. This change wraps the agent's command in a shell script that uses /bin/wait4path to ensure /nix/store is ready before executing the original program. It also ensures that ProgramArguments are correctly escaped and concatenated.
25 lines
No EOL
768 B
Text
25 lines
No EOL
768 B
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>Label</key>
|
|
<string>org.nix-community.home.git-maintenance-weekly</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>/bin/sh</string>
|
|
<string>-c</string>
|
|
<string>/bin/wait4path /nix/store && exec @git@/bin/git for-each-repo --keep-going '--config=maintenance.repo' maintenance run '--schedule=weekly'</string>
|
|
</array>
|
|
<key>StartCalendarInterval</key>
|
|
<array>
|
|
<dict>
|
|
<key>Hour</key>
|
|
<integer>0</integer>
|
|
<key>Minute</key>
|
|
<integer>53</integer>
|
|
<key>Weekday</key>
|
|
<integer>0</integer>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
</plist> |