From aa1fa3dc739d57d7808686a53339c8d7f3b6a80a Mon Sep 17 00:00:00 2001 From: Shun Kakinoki Date: Mon, 3 Aug 2026 11:07:29 +0800 Subject: [PATCH] fix(tokscale): expose crontab during activation --- home-manager/services/tokscale/default.nix | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/home-manager/services/tokscale/default.nix b/home-manager/services/tokscale/default.nix index 157ff1990..cb1221739 100644 --- a/home-manager/services/tokscale/default.nix +++ b/home-manager/services/tokscale/default.nix @@ -10,6 +10,16 @@ let pkgs.bash pkgs.coreutils ]; + activationPath = lib.concatStringsSep ":" [ + "/run/wrappers/bin" + "/run/current-system/sw/bin" + (lib.makeBinPath [ + pkgs.coreutils + pkgs.gawk + ]) + "/usr/bin" + "/bin" + ]; # Every 3 hours, aligned to the wall clock. calendarHours = [ 0 @@ -55,7 +65,8 @@ in # Linux (cron) home.activation.installTokscaleCron = lib.mkIf pkgs.stdenv.isLinux ( config.lib.dag.entryAfter [ "writeBoundary" ] '' - $DRY_RUN_CMD ${pkgs.bash}/bin/bash "${./activate-cron.sh}" ${lib.escapeShellArg cronCommand} + $DRY_RUN_CMD ${pkgs.coreutils}/bin/env PATH=${lib.escapeShellArg activationPath} \ + ${pkgs.bash}/bin/bash "${./activate-cron.sh}" ${lib.escapeShellArg cronCommand} '' ); }