diff --git a/hosts/tatos/services/wireguard/default.nix b/hosts/tatos/services/wireguard/default.nix index 3d54ab4..ad369df 100644 --- a/hosts/tatos/services/wireguard/default.nix +++ b/hosts/tatos/services/wireguard/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, ... }: # Source: https://habr.com/ru/companies/xakep/articles/699000/ @@ -21,7 +21,14 @@ in 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 = { # "wg0" is the network interface name. You can name the interface arbitrarily.