diff --git a/machine-confs/helium.nix b/machine-confs/helium.nix index c20d693..b419fb0 100644 --- a/machine-confs/helium.nix +++ b/machine-confs/helium.nix @@ -7,10 +7,10 @@ wg-quick.interfaces = { wg0 = { - autostart = false; - address = [ "172.16.0.2/24" ]; + autostart = true; + address = [ "fd08:d473:bcca:f0::2/64" ]; dns = [ - "192.168.0.1" + "fd08:d473:bcca::1" "vsinerva.fi" ]; privateKeyFile = "/root/wireguard-keys/privatekey-home"; @@ -19,8 +19,11 @@ peers = [ { publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34="; - allowedIPs = [ "0.0.0.0/0" ]; - endpoint = "wg.vsinerva.fi:51820"; + allowedIPs = [ + "fd08:d473:bcca::/64" + "fd08:d473:bcca:f0::/64" + ]; + endpoint = "wg.vsinerva.fi:51821"; } ]; }; @@ -42,31 +45,10 @@ } ]; }; - wg2 = { - autostart = true; - address = [ "fd08:d473:bcca:f0::2/64" ]; - dns = [ - "fd08:d473:bcca::1" - "vsinerva.fi" - ]; - privateKeyFile = "/root/wireguard-keys/privatekey-home"; - listenPort = 51820; - - peers = [ - { - publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34="; - allowedIPs = [ - "fd08:d473:bcca::/64" - "fd08:d473:bcca:f0::/64" - ]; - endpoint = "wg.vsinerva.fi:51821"; - } - ]; - }; }; }; # Dirty hack to fix autostart failing due to DNS lookups - systemd.services."wg-quick-wg2".serviceConfig = { + systemd.services."wg-quick-wg0".serviceConfig = { Restart = "on-failure"; RestartSec = "1s"; }; diff --git a/machine-confs/lithium.nix b/machine-confs/lithium.nix index 81fa25b..3fe9a15 100644 --- a/machine-confs/lithium.nix +++ b/machine-confs/lithium.nix @@ -7,24 +7,6 @@ wg-quick.interfaces = { wg0 = { - autostart = false; - address = [ "172.16.0.4/24" ]; - dns = [ - "192.168.0.1" - "vsinerva.fi" - ]; - privateKeyFile = "/root/wireguard-keys/privatekey-home"; - listenPort = 51820; - - peers = [ - { - publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34="; - allowedIPs = [ "0.0.0.0/0" ]; - endpoint = "wg.vsinerva.fi:51820"; - } - ]; - }; - wg1 = { autostart = true; address = [ "fd08:d473:bcca:f0::3/64" ]; dns = [ @@ -48,7 +30,7 @@ }; }; # Dirty hack to fix autostart failing due to DNS lookups - systemd.services."wg-quick-wg1".serviceConfig = { + systemd.services."wg-quick-wg0".serviceConfig = { Restart = "on-failure"; RestartSec = "1s"; }; diff --git a/services/syncthing.nix b/services/syncthing.nix index f45a3f2..1d91fb9 100644 --- a/services/syncthing.nix +++ b/services/syncthing.nix @@ -30,7 +30,7 @@ }; "phone" = { id = "K6QCK2R-BU65RAC-PHTGLIA-24IHDXE-N6VNBAW-QYREMVD-XWGWKRA-VX2BNAK"; - addresses = [ "tcp://172.16.0.3:22000" ]; + addresses = [ "tcp://[fd08:d473:bcca:f0::10]:22000" ]; }; };