Replace systemd timers with startAt

This commit is contained in:
coolneng 2021-04-29 16:48:44 +02:00
parent 63a9fb80a1
commit 7af1063f1f
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 3 additions and 18 deletions

View File

@ -15,16 +15,8 @@ in {
cd "$base_folder" || exit cd "$base_folder" || exit
ls | xargs -P10 -I{} git -C {} pull --rebase ls | xargs -P10 -I{} git -C {} pull --rebase
''; '';
serviceConfig = { Type = "oneshot"; }; serviceConfig.Type = "oneshot";
};
systemd.user.timers.git-pull = {
description = "Daily code update";
wantedBy = [ "default.target" ];
timerConfig = {
OnCalendar = "22:00:00"; OnCalendar = "22:00:00";
Unit = "git-pull.service";
};
}; };
# PostgreSQL daily backups # PostgreSQL daily backups
@ -47,14 +39,7 @@ in {
chown -R dnsmasq ${stateDir} chown -R dnsmasq ${stateDir}
systemctl restart dnsmasq 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";
};
};
} }