diff --git a/flake.nix b/flake.nix index ec0da331..28b3bca2 100644 --- a/flake.nix +++ b/flake.nix @@ -148,9 +148,9 @@ }; suites = with profiles; rec { base = [ core users.root users.anish ]; - sealight = [ base server metrics gitea rss-bridge mount-mossnet ]; # matrix + sealight = [ base server metrics gitea rss-bridge mount-mossnet ]; lituus = [ base server metrics sealight-website matrix wireguard-server ]; - mossnet = [ base server taskd shaarli dns monitoring nfs gonic headphones radicale seafile syncthing dhyan calibre wallabag finance ]; # hpi sync.music + mossnet = [ base server taskd shaarli dns monitoring nfs gonic headphones radicale seafile syncthing dhyan calibre wallabag finance muneem ]; # hpi sync.music cube = [ base site server ]; graphical = [ base bluetooth music sync.kitaab sync.website sync.cal wifi desktop mimetypes ]; curve = [ graphical secrets syncthing ]; diff --git a/profiles/muneem/default.nix b/profiles/muneem/default.nix new file mode 100644 index 00000000..a82690ac --- /dev/null +++ b/profiles/muneem/default.nix @@ -0,0 +1,35 @@ +{ 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 dhyan.main` once before installing this script + # If you've updated muneem, you'll want to cd to /home/anish/usr/dhyan and run git pull + systemd.services.muneem = { + serviceConfig.Type = "oneshot"; + path = with pkgs; [ + babashka + git + jdk11 + curl + chromedriver + chromium + ]; + startAt = "Tue *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 = [ "Tue *03:00:00" ]; + }; +}