From 9b1d3dfab99f7a05fbb85d5b5ef2c916cf6069a9 Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Sun, 7 Jan 2024 04:47:51 -0600 Subject: [PATCH] fixed sudo bug on sub-sync --- server/configuration.org | 54 ++++++++++++++++++++++------------------ server/servers.nix | 2 +- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/server/configuration.org b/server/configuration.org index 70d80bf..46cca16 100644 --- a/server/configuration.org +++ b/server/configuration.org @@ -907,8 +907,37 @@ in [ myPkg ]; overrideStrategy = "asDropin"; wantedBy = [ "multi-user.target" ]; }; + sub-sync = { + restartIfChanged = true; + description = "syncronizes subtitles downloaded & modified today"; + wantedBy = [ "multi-user.target" ]; + path = [ + pkgs.bash + pkgs.fd + pkgs.ripgrep + pkgs.file + pkgs.alass + pkgs.ffmpeg + pkgs.gum + jawzSubs + ]; + serviceConfig = { + Restart = "on-failure"; + RestartSec = 30; + ExecStart = "${jawzSubs}/bin/sub-sync all"; + }; + }; + }; + timers = { + sub-sync = { + enable = true; + description = "syncronizes subtitles downloaded & modified today"; + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "22:00"; + }; + }; }; - timers = { }; user = { services = { HentaiAtHome = { @@ -965,21 +994,6 @@ 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"; @@ -1012,14 +1026,6 @@ in [ myPkg ]; 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"; diff --git a/server/servers.nix b/server/servers.nix index 43ba0f5..dcec6f0 100644 --- a/server/servers.nix +++ b/server/servers.nix @@ -235,7 +235,7 @@ in { (builtins.readFile ../scripts/nextcloud-cronjob.sh); in { description = "Runs various nextcloud-related cronjobs"; - wantedBy = [ "default.target" ]; + wantedBy = [ "multi-user.target" ]; path = [ pkgs.bash jawzNextcloudCronjob ]; serviceConfig = { Restart = "on-failure";