4 Commits

Author SHA1 Message Date
Austin Horstman
02618d94f8 nh: use systemd escaping for cleanup argument lists
Use the shared helper to preserve argument boundaries in ExecStart, including embedded newlines. Keep legacy strings and Darwin behavior unchanged, and cover the newline case in a Linux regression test.
2026-09-12 22:02:25 -05:00
OddMagnet
d3c99311d7 nh: accept a list for clean.extraArgs
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.
2026-09-12 22:02:25 -05:00
Foxocube
4e97102bd4 nh: add options for specific flakes (#7566)
* nh: Add options for specific flakes
* nh: Add tests for specific flake options

---------

Co-authored-by: Foxocube <git@foxocube.xyz>
2025-07-31 12:41:29 -05:00
Ali Jamadi
e8a3e2c1e0 nh: fix clean option behaviour for Darwin 2025-06-30 21:12:20 -05:00