aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSymphorien Gibol <symphorien+git@xlumurb.eu>2020-09-17 12:00:00 +0000
committerRobert Helgesson <robert@rycee.net>2020-09-18 00:16:22 +0200
commit92c682cd1005652699382029ca616aec888cd394 (patch)
tree26f816018705bf35fb55fe4e22c0532c2d9fd2d6
parent472ca211cac604efdf621337067a237be9df389e (diff)
unison: fix escaping of arguments
The `ExecStart=` option of systemd must take arguments fully quoted. That is, "-sshargs=-i somekey" and not -ssargs="-i somekey" Additionally, inside arguments passed to unison, `=` characters must be quoted. After unquotation by systemd, one must have -sshargs=-o Foo\=4 instead of -sshargs=-o Foo=4
-rw-r--r--modules/services/unison.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/services/unison.nix b/modules/services/unison.nix
index 93c59e8fd62..a9cf23fb66e 100644
--- a/modules/services/unison.nix
+++ b/modules/services/unison.nix
@@ -60,7 +60,7 @@ let
};
};
- serialiseArg = key: val: "-${key}=${escapeShellArg val}";
+ serialiseArg = key: val: escapeShellArg "-${key}=${escape [ "=" ] val}";
serialiseArgs = args: concatStringsSep " " (mapAttrsToList serialiseArg args);