This commit is contained in:
bogale 2026-11-08 20:50:07 +09:00
commit 69d24d2e7f
4 changed files with 12 additions and 23 deletions

View file

@ -29,4 +29,15 @@
};
};
};
systemd.services.hotspot-routing = {
after = [ "wg-quick-awg0.service" ];
path = [ pkgs.iproute2 ];
preStop = "ip rule del from 10.1.0.0/16 lookup main";
requiredBy = [ "wg-quick-awg0.service" ];
script = "ip rule add from 10.1.0.0/16 lookup main";
serviceConfig = {
RemainAfterExit = true;
Type = "oneshot";
};
};
}

View file

@ -18,17 +18,6 @@
sops.secrets.tgbot-env = { };
systemd = {
services = {
hotspot-routing = {
after = [ "wg-quick-awg0.service" ];
path = [ pkgs.iproute2 ];
preStop = "ip rule del from 10.1.0.0/16 lookup main";
requiredBy = [ "wg-quick-awg0.service" ];
script = "ip rule add from 10.1.0.0/16 lookup main";
serviceConfig = {
RemainAfterExit = true;
Type = "oneshot";
};
};
network-watchdog = {
path = with pkgs; [
curl