helm/profiles/muneem/default.nix
2022-12-01 16:33:13 +10:00

36 lines
1,023 B
Nix

{ pkgs, ... }:
{
# TODO
# scrappy script that requires muneem be cloned to /home/anish/usr/muneem
# you also gotta setup .envrc and add all the secrets there lol
# muneem needs secrets, and internet access to install dependencies, havent figured that out with nix yet
# muneem also depends on jdk11, but that's only to install dependencies, run `bb -m muneem.main` once before installing this script
# If you've updated muneem, you'll want to cd to /home/anish/usr/muneem and run git pull
systemd.services.muneem = {
serviceConfig.Type = "oneshot";
path = with pkgs; [
babashka
git
jdk11
curl
chromedriver
chromium
];
startAt = "Thu 03:00:00";
script = ''
cd /home/anish/usr/muneem
source .envrc
bb -m muneem.main
'';
serviceConfig = {
User = "anish";
};
};
systemd.timers.muneem = {
wantedBy = [ "timers.target" ];
partOf = [ "muneem.service" ];
timerConfig.OnCalendar = [ "Thu 03:00:00" ];
};
}