host/tatos: add cronjobs to update routes

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-18 10:43:23 +03:00
parent 6c376a4f33
commit 10679db066
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, ... }:
# Source: https://habr.com/ru/companies/xakep/articles/699000/ # Source: https://habr.com/ru/companies/xakep/articles/699000/
@ -21,7 +21,14 @@ in
internalInterfaces = [ "wg0" ]; internalInterfaces = [ "wg0" ];
}; };
environment.systemPackages = [ update_ru_routes ]; services.cron = {
enable = true;
systemCronJobs = let cmd = "${update_ru_routes}/bin/update_ru_routes > /root/update_routes.log 2>&1"; in [
"@reboot sleep 30 && ${cmd}"
"0 3 * * mon ${cmd}"
];
};
networking.wg-quick.interfaces = { networking.wg-quick.interfaces = {
# "wg0" is the network interface name. You can name the interface arbitrarily. # "wg0" is the network interface name. You can name the interface arbitrarily.