diff --git a/hosts/tatos/services/wireguard/default.nix b/hosts/tatos/services/wireguard/default.nix index ad369df..d8082d2 100644 --- a/hosts/tatos/services/wireguard/default.nix +++ b/hosts/tatos/services/wireguard/default.nix @@ -8,7 +8,6 @@ let tatosData = import ../../data.secret.nix; port = tatosData.wireguard.port; - update_ru_routes = pkgs.callPackage ./update_ru_routes.nix { }; in { boot.kernel.sysctl."net.ipv4.ip_forward" = 1; @@ -21,13 +20,18 @@ in internalInterfaces = [ "wg0" ]; }; - 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}" - ]; - }; + services.cron = + let + update_ru_routes = pkgs.callPackage ./update_ru_routes.nix { }; + cmd = "${update_ru_routes}/bin/update_ru_routes > /root/update_routes.log 2>&1"; + in + { + enable = true; + systemCronJobs = [ + "@reboot sleep 30 && ${cmd}" + "0 3 * * mon ${cmd}" + ]; + }; networking.wg-quick.interfaces = {