mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-03 20:19:19 +00:00
Splitting the string on spaces broke arguments that legitimately contain one, such as `--keep-since=1 day`. Accept a list of strings alongside the string instead, each element being one argument, and restore the previous behaviour for strings on both platforms: command line text that systemd splits on Linux, a single argument on Darwin. Darwin users passing several flags in one string have to switch to a list to work around the launchd quoting. On Linux the arguments are only appended when non-empty, which drops a trailing space from ExecStart.
25 lines
682 B
Plaintext
25 lines
682 B
Plaintext
<?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.nh-clean</string>
|
|
<key>ProgramArguments</key>
|
|
<array>
|
|
<string>/bin/sh</string>
|
|
<string>-c</string>
|
|
<string>/bin/wait4path /nix/store && exec @nh@/bin/nh clean user '--keep-since=1 day'</string>
|
|
</array>
|
|
<key>StartCalendarInterval</key>
|
|
<array>
|
|
<dict>
|
|
<key>Hour</key>
|
|
<integer>0</integer>
|
|
<key>Minute</key>
|
|
<integer>0</integer>
|
|
<key>Weekday</key>
|
|
<integer>1</integer>
|
|
</dict>
|
|
</array>
|
|
</dict>
|
|
</plist> |