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