diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2021-05-03 18:02:31 -0400 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2021-05-03 18:02:31 -0400 |
commit | 94143d389cd3a34857ed0bf5327fa522ed1a03c9 (patch) | |
tree | add3d7f87e01709e397a341485f644eb79f17b4b /config/router.nix | |
parent | 0ba226862161e20f6cf2c961580cb0999b969497 (diff) |
Update router
Diffstat (limited to 'config/router.nix')
-rw-r--r-- | config/router.nix | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/config/router.nix b/config/router.nix index aaa2a42..1bcf876 100644 --- a/config/router.nix +++ b/config/router.nix @@ -211,15 +211,19 @@ in 200 he ''; - networking.localCommands = '' - ip -6 rule add from 2001:470:8e2e::/48 lookup he prio 0 || true - ip -6 route flush cache - ip -6 route replace default dev he0 src 2001:470:8e2e:20::d table he - ip -6 route flush cache - ''; + systemd.services.network-route-setup = { + description = "HE tunnel route setup"; + requires = ["network-online.target"]; + after = ["network.target" "network-online.target"]; + wantedBy = ["multi-user.target"]; + script = '' + ip -6 rule add from 2001:470:8e2e::/48 lookup he prio 0 || true + ip -6 route replace default dev he0 src 2001:470:8e2e:20::d table he + ip -6 route flush cache + ''; + }; networking.wireguard.interfaces.mullvad.postSetup = '' - ip route flush cache ip rule add fwmark ${toString mullvadMark} table mullvad ip route replace default dev mullvad table mullvad ip route flush cache |