In NixOS, maintainer used a patch to modify the DEFAULT_PATH macro of systemd.
However, systemd can only find its own binaries under that path.
At this point, if you take the relative path of the binary as a parameter to StartTransientUnit,
systemd will use DEFAULT_PATH to look for the binary, which will cause systemd to not find it.
There may be other Linux distributions that change this path,
so add ExecSearchPath to prevent systemd from not finding the binary.
Signed-off-by: ComixHe <heyuming@deepin.org>
ExitType defaults to `main`, which means systemd will kill all processes
in the application cgroup when the "main" process exited.
This default behavior make applications like vscode which will always
daemonlize itself killed immediately by systemd, so we should set this
property to `cgroup` instead.
refer to https://www.freedesktop.org/software/systemd/man/systemd.service.html#ExitType=
Signed-off-by: black-desk <me@black-desk.cn>