From 7af1063f1f1a8dac746b8a0348bd053c2e4ddd4e Mon Sep 17 00:00:00 2001 From: coolneng Date: Thu, 29 Apr 2021 16:48:44 +0200 Subject: [PATCH] Replace systemd timers with startAt --- modules/periodic.nix | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/modules/periodic.nix b/modules/periodic.nix index 58bc27e..aef0b07 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -15,16 +15,8 @@ in { cd "$base_folder" || exit ls | xargs -P10 -I{} git -C {} pull --rebase ''; - serviceConfig = { Type = "oneshot"; }; - }; - - systemd.user.timers.git-pull = { - description = "Daily code update"; - wantedBy = [ "default.target" ]; - timerConfig = { - OnCalendar = "22:00:00"; - Unit = "git-pull.service"; - }; + serviceConfig.Type = "oneshot"; + OnCalendar = "22:00:00"; }; # PostgreSQL daily backups @@ -47,14 +39,7 @@ in { chown -R dnsmasq ${stateDir} systemctl restart dnsmasq ''; + startAt = "02:00:00"; }; - systemd.timers.download-dns-blocklist = { - description = "Daily download of hosts-blocklists"; - wantedBy = [ "default.target" ]; - timerConfig = { - OnCalendar = "02:00:00"; - Unit = "download-dns-blocklist.service"; - }; - }; }