helm/hosts/profiles/dhyan/default.nix

34 lines
978 B
Nix
Raw Normal View History

2022-09-18 15:13:50 -07:00
{ pkgs, ... }:
{
# 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
systemd.services.dhyan = {
serviceConfig.Type = "oneshot";
path = [
pkgs.babashka
pkgs.git
pkgs.jdk11
pkgs.curl
];
startAt = "*08:00:00";
script = ''
source .envrc
bb -m dhyan.main
'';
serviceConfig = {
User = "anish";
2022-12-19 21:51:01 -08:00
WorkingDirectory = "/home/anish/usr/dhyan";
Environment = "/home/anish/usr/.envrc";
2022-09-18 15:13:50 -07:00
};
};
systemd.timers.dhyan = {
wantedBy = [ "timers.target" ];
2022-12-19 21:51:01 -08:00
partOf = [ "dhyan.service" ];
2022-09-18 15:13:50 -07:00
timerConfig.OnCalendar = [ "08:00:00" ];
};
}