From ca5fa61221514eaa646d8d57bdf5c7d41916c363 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Thu, 28 Dec 2023 22:14:31 -0600 Subject: [PATCH] sub-sync now takes date argument and added to systemd --- server/configuration.org | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/server/configuration.org b/server/configuration.org index db14680..efbde07 100644 --- a/server/configuration.org +++ b/server/configuration.org @@ -47,6 +47,8 @@ let "manage-library" (builtins.readFile ../scripts/manage-library.sh); jawzTasks = pkgs.writeScriptBin "tasks" (builtins.readFile ../scripts/tasks.sh); + jawzSubs = pkgs.writeScriptBin + "sub-sync" (builtins.readFile ../scripts/sub-sync.sh); in { # Remember to close this bracket at the end of the document #+end_src @@ -395,6 +397,7 @@ Here I compile my own scripts into binaries #+begin_src nix jawzManageLibrary jawzTasks +jawzSubs (writeScriptBin "ffmpeg4discord" (builtins.readFile ../scripts/ffmpeg4discord.py)) (writeScriptBin "ffmpreg" (builtins.readFile ../scripts/ffmpreg.sh)) (writeScriptBin "chat-dl" (builtins.readFile ../scripts/chat-dl.sh)) @@ -961,6 +964,21 @@ in [ myPkg ]; ExecStart = "${jawzTasks}/bin/tasks"; }; }; + sub-sync = { + restartIfChanged = true; + description = "syncronizes subtitles downloaded & modified today"; + wantedBy = [ "default.target" ]; + path = [ + pkgs.bash + pkgs.nix + jawzSubs + ]; + serviceConfig = { + Restart = "on-failure"; + RestartSec = 30; + ExecStart = "${jawzSubs}/bin/sub-sync all"; + }; + }; qbit_manage = let qbit_dir = "/home/jawz/Development/Git/qbit_manage"; in { restartIfChanged = true; description = "Tidy up my torrents"; @@ -985,6 +1003,22 @@ in [ myPkg ]; OnCalendar = "*:0/10"; }; }; + manage-library = { + enable = true; + description = "Run the manage library bash script"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "00:30"; + }; + }; + sub-sync = { + enable = true; + description = "syncronizes subtitles downloaded & modified today"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "22:00"; + }; + }; qbit_manage = { enable = true; description = "Tidy up my torrents";