From 7324c1d1dd189a81589bc07d5501571047f3db5f Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Thu, 18 Apr 2024 10:51:14 +0300 Subject: [PATCH] host/tatos: style changes --- hosts/tatos/services/wireguard/default.nix | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) 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 = {