nixos/rshim: fix shell escape

Using escapeShellArg does not make sense here because (a) it turned the
list into a string, so the entire service failed and (b) because systemd
does not use the same escaping mechanism as bash.
This commit is contained in:
nikstur 2023-05-15 14:06:26 +02:00
parent 6d6c7c5993
commit 6852dc2359

View file

@ -3,11 +3,11 @@
let
cfg = config.services.rshim;
rshimCommand = lib.escapeShellArgs ([ "${cfg.package}/bin/rshim" ]
rshimCommand = [ "${cfg.package}/bin/rshim" ]
++ lib.optionals (cfg.backend != null) [ "--backend ${cfg.backend}" ]
++ lib.optionals (cfg.device != null) [ "--device ${cfg.device}" ]
++ lib.optionals (cfg.index != null) [ "--index ${builtins.toString cfg.index}" ]
++ [ "--log-level ${builtins.toString cfg.log-level}" ])
++ [ "--log-level ${builtins.toString cfg.log-level}" ]
;
in
{