From 0ba9124baa1fb952faba9d6f9afb3d59fef90201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kier=C3=A1n=20Meinhardt?= Date: Sat, 25 Feb 2023 08:32:38 +0100 Subject: [PATCH] fix(moodle-dl): create config correctly --- modules/moodle-dl.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/moodle-dl.nix b/modules/moodle-dl.nix index ca1c60f..1392988 100644 --- a/modules/moodle-dl.nix +++ b/modules/moodle-dl.nix @@ -81,7 +81,7 @@ in { Group = config.users.groups.moodle-dl.name; WorkingDirectory = cfg.directory; ExecStart = "${cfg.package}/bin/moodle-dl ${lib.optionalString cfg.notifyOnly "--without-downloading-files"}"; - ExecStartPre = "${pkgs.jq}/bin/jq -s '.[0] *.[1]' ${toString moodle-dl-json} ${toString cfg.tokensFile} > ${cfg.directory}/config.json"; + ExecStartPre = pkgs.writers.writeDash "moodle-dl-config" "${pkgs.jq}/bin/jq -s '.[0] * .[1]' ${toString moodle-dl-json} ${toString cfg.tokensFile} > ${cfg.directory}/config.json"; } (mkIf (cfg.directory == stateDirectoryDefault) {StateDirectory = "moodle-dl";}) ];