Deluge: Difference between revisions
No edit summary |
m Fix typo in nix code |
||
| (One intermediate revision by the same user not shown) | |||
| Line 35: | Line 35: | ||
RemainAfterExit = true; | RemainAfterExit = true; | ||
ExecStart = with pkgs; writers.writeBash "wg-up" '' | ExecStart = with pkgs; writers.writeBash "wg-up" '' | ||
set -e | |||
${iproute2}/bin/ip link add wg0 type wireguard | ${iproute2}/bin/ip link add wg0 type wireguard | ||
${iproute2}/bin/ip link set wg0 netns wg | ${iproute2}/bin/ip link set wg0 netns wg | ||
| Line 46: | Line 46: | ||
${iproute2}/bin/ip -n wg link set lo up | ${iproute2}/bin/ip -n wg link set lo up | ||
${iproute2}/bin/ip -n wg route add default dev wg0 | ${iproute2}/bin/ip -n wg route add default dev wg0 | ||
# ${ | # ${iproute2}/bin/ip -n wg -6 route add default dev wg0 | ||
''; | ''; | ||
ExecStop = with pkgs; writers.writeBash "wg-down" '' | ExecStop = with pkgs; writers.writeBash "wg-down" '' | ||