2022-07-10 23:54:02 -07:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
2022-07-13 01:41:03 -07:00
|
|
|
# TODO
|
|
|
|
# scrappy script that requires dhyan be cloned to /home/anish/usr/dhyan
|
|
|
|
# dhyan needs secrets, and internet access to install dependencies, havent figured that out with nix yet
|
|
|
|
# dhyan also depends on jdk11, but that's only to install dependencies, run `bb -m dhyan.main` once before installing this script
|
|
|
|
# If you've updated dhyan, you'll want to cd to /home/anish/usr/dhyan and run git pull
|
2022-07-10 23:54:02 -07:00
|
|
|
systemd.services.dhyan = {
|
|
|
|
serviceConfig.Type = "oneshot";
|
|
|
|
path = [
|
|
|
|
pkgs.babashka
|
2022-07-13 01:31:52 -07:00
|
|
|
pkgs.git
|
|
|
|
pkgs.curl
|
2022-07-10 23:54:02 -07:00
|
|
|
];
|
2022-07-13 01:31:52 -07:00
|
|
|
startAt = "*08:00:00";
|
2022-07-10 23:54:02 -07:00
|
|
|
script = ''
|
|
|
|
cd /home/anish/usr/dhyan
|
|
|
|
source .envrc
|
|
|
|
bb -m dhyan.main
|
|
|
|
'';
|
|
|
|
serviceConfig = {
|
|
|
|
User = "anish";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
systemd.timers.dhyan = {
|
|
|
|
wantedBy = [ "timers.target" ];
|
|
|
|
partOf = [ "kitaab-sync.service" ];
|
2022-07-13 01:41:03 -07:00
|
|
|
timerConfig.OnCalendar = [ "08:00:00" ];
|
2022-07-10 23:54:02 -07:00
|
|
|
};
|
|
|
|
}
|