host/tatos: add cronjobs to update routes
This commit is contained in:
parent
6c376a4f33
commit
10679db066
1 changed files with 9 additions and 2 deletions
|
@ -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.
|
||||||
|
|
Loading…
Reference in a new issue