macs: bring up the wg0 port forward socats after wg0 is setup
Eelco Dolstra committed
Dec 28, 2021 at 14:59 UTC
0533b923269dd3c632503c62215eb61c9be0978a
1 file changed
+2
macs/host/networking.nix
+2
@@ -101,6 +101,7 @@ in {
101
102
systemd.services.forward-wg0-ssh-to-guest = {
103
wantedBy = [ "multi-user.target" ];
104
+ after = [ "wireguard-wg0.service" ];
105
script = ''
106
set -euxo pipefail
107
exec ${pkgs.socat}/bin/socat TCP-LISTEN:2200,fork,so-bindtodevice=${config.macosGuest.network.sshInterface} TCP:${guestIP}:22
@@ -109,6 +110,7 @@ in {
110
111
systemd.services.forward-wg0-prometheus-to-guest = {
112
wantedBy = [ "multi-user.target" ];
113
+ after = [ "wireguard-wg0.service" ];
114
script = ''
115
set -euxo pipefail
116
exec ${pkgs.socat}/bin/socat TCP-LISTEN:9101,fork,so-bindtodevice=${config.macosGuest.network.sshInterface} TCP:${guestIP}:9100