NixOS/modules/scripts/update-org-agenda-cache.nix
2025-10-12 14:12:19 -06:00

22 lines
557 B
Nix

{
config,
lib,
pkgs,
...
}:
{
config.my.scripts.update-org-agenda-cache = {
enable = lib.mkDefault false;
install = config.my.emacs.enable;
service = config.my.emacs.enable;
name = "update-org-agenda-cache";
timer = "*:0/30";
description = "runs a function which builds a cache file.";
package = pkgs.writeScriptBin "update-org-agenda-cache" ''
#!/usr/bin/env nix-shell
#! nix-shell -i bash -p bash
${config.services.emacs.package}/bin/emacsclient --eval '(my/update-org-agenda-cache)'
'';
};
}