nixos/sonarr: use lib.getExe and escape args

This commit is contained in:
Ivan Trubach 2024-03-02 15:31:56 +03:00
parent b7c782f8a4
commit 5d7d3dcfe7

View File

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, utils, ... }:
with lib;
@ -54,7 +54,11 @@ in
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStart = "${cfg.package}/bin/NzbDrone -nobrowser -data='${cfg.dataDir}'";
ExecStart = utils.escapeSystemdExecArgs [
(lib.getExe cfg.package)
"-nobrowser"
"-data=${cfg.dataDir}"
];
Restart = "on-failure";
};
};