X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Ftools%2Fcloud%2Fdefault.nix;h=99add805da548664819b7e1a1b2939f2635be42a;hp=fffe04ca4076101fc484b0fa797cbe734936113d;hb=c418f62a4aba4a135143527369ad0460ccd9f582;hpb=0e118a8c5326134b6e421e2d23fba0f211f8d964 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 '' ]; };