From b50b53238c8aca7b9fdc8ad21df5cd9ef3aa5454 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Fri, 22 Apr 2022 13:13:17 +0800 Subject: [PATCH] services/gallery-dl: fix script and options --- modules/nixos/services/gallery-dl.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/modules/nixos/services/gallery-dl.nix b/modules/nixos/services/gallery-dl.nix index 23e9ef94..08ea5c38 100644 --- a/modules/nixos/services/gallery-dl.nix +++ b/modules/nixos/services/gallery-dl.nix @@ -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;