services/gallery-dl: fix script and options

This commit is contained in:
Gabriel Arazas 2022-04-22 13:13:17 +08:00
parent c0dd8ab1a8
commit b50b53238c

View File

@ -138,9 +138,11 @@ in {
documentation = [ "man:gallery-dl(1)" ];
enable = true;
path = [ cfg.package ] ++ (with pkgs; [ coreutils ffmpeg ]);
preStart = ''
mkdir -p ${lib.escapeShellArg cfg.archivePath}
'';
script = ''
mkdir -p ${lib.escapeShellArg cfg.archivePath} \
&& gallery-dl ${lib.concatStringsSep " " cfg.extraArgs} ${
gallery-dl ${lib.concatStringsSep " " cfg.extraArgs} ${
lib.concatStringsSep " " value.extraArgs
} ${
lib.optionalString (cfg.settings != null)
@ -153,9 +155,9 @@ in {
serviceConfig = {
NoNewPrivileges = true;
PrivateTmp = true;
ProtectControlGroup = true;
ProtectControlGroups = true;
ProtectClock = true;
ProtectKernelModule = true;
ProtectKernelModules = true;
ProtectKernelLogs = true;
};
}) cfg.jobs;