rclone: drop unused sidecarType arg from sidecar builders
mkLaunchdSidecar uses a strict argument pattern that did not include sidecarType, but the call site was passing it via inherit, breaking evaluation of any darwin config that defined a mount or serve sidecar. Since isMount already encodes the same information as sidecarType == "mounts", remove sidecarType from the call site and replace the two systemd uses with isMount / !isMount.
This commit is contained in:
parent
6cfa655a20
commit
8da35b6f14
1 changed files with 2 additions and 8 deletions
|
|
@ -73,7 +73,6 @@ let
|
|||
# of a `nameValuePair` (the unit attrs).
|
||||
mkSystemdSidecar =
|
||||
{
|
||||
sidecarType,
|
||||
remoteName,
|
||||
sidecar,
|
||||
sidecarPath,
|
||||
|
|
@ -91,12 +90,9 @@ let
|
|||
|
||||
Service = {
|
||||
Type =
|
||||
if sidecarType == "serve" && !(builtins.elem sidecar.protocol serveProtocolNotifies) then
|
||||
"simple"
|
||||
else
|
||||
"notify";
|
||||
if !isMount && !(builtins.elem sidecar.protocol serveProtocolNotifies) then "simple" else "notify";
|
||||
Environment =
|
||||
(lib.optional (sidecarType == "mounts") "PATH=/run/wrappers/bin")
|
||||
(lib.optional isMount "PATH=/run/wrappers/bin")
|
||||
++ lib.optional (sidecar.logLevel != null) "RCLONE_LOG_LEVEL=${sidecar.logLevel}";
|
||||
SuccessExitStatus = "143";
|
||||
|
||||
|
|
@ -130,7 +126,6 @@ let
|
|||
# of a `nameValuePair` (the agent attrs).
|
||||
mkLaunchdSidecar =
|
||||
{
|
||||
sidecarType,
|
||||
remoteName,
|
||||
sidecar,
|
||||
sidecarPath,
|
||||
|
|
@ -203,7 +198,6 @@ let
|
|||
lib.optional sidecar.enable (
|
||||
lib.nameValuePair "rclone-${cmdName}:${replaceIllegalChars sidecarPath}@${remoteName}" (mkValue {
|
||||
inherit
|
||||
sidecarType
|
||||
remoteName
|
||||
sidecar
|
||||
sidecarPath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue