From: Ismaƫl Bouya Date: Tue, 12 Nov 2019 06:14:01 +0000 (+0100) Subject: Fix nextcloud cron X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=commitdiff_plain;h=c418f62a4aba4a135143527369ad0460ccd9f582 Fix nextcloud cron --- diff --git a/modules/private/websites/tools/cloud/default.nix b/modules/private/websites/tools/cloud/default.nix index fffe04c..99add80 100644 --- a/modules/private/websites/tools/cloud/default.nix +++ b/modules/private/websites/tools/cloud/default.nix @@ -177,10 +177,16 @@ in { services.cron = { enable = true; - systemCronJobs = [ + systemCronJobs = let + script = pkgs.writeScriptBin "nextcloud-cron" '' + #! ${pkgs.stdenv.shell} + export LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive + export PATH=/run/wrappers/bin:$PATH + ${pkgs.php}/bin/php -f ${nextcloud}/cron.php + ''; + in [ '' - LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive - */15 * * * * wwwrun ${pkgs.php}/bin/php -f ${nextcloud}/cron.php + */15 * * * * wwwrun ${script}/bin/nextcloud-cron '' ]; };