add dhyan systemd service that requires dhyan to be pre-cloned
This commit is contained in:
parent
b0937f8c59
commit
c932240a83
27
profiles/dhyan/default.nix
Normal file
27
profiles/dhyan/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# TODO scrappy script that requires dhyan be cloned to /home/anish/usr/dhyan
|
||||
# dhyan needs secrets, and internet access to run, havent figured that out with nix yet
|
||||
systemd.services.dhyan = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
path = [
|
||||
pkgs.babashka
|
||||
pkgs.jdk11
|
||||
];
|
||||
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" ];
|
||||
timerConfig.OnCalendar = [ "daily" ];
|
||||
startAt = "*08:00:00";
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue