From c6b18d0c734120c743441e0709c60612effea452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Thu, 26 Dec 2024 15:56:45 +0100 Subject: [PATCH] Better Wireguard on Aloria --- hosts/Aloria/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/hosts/Aloria/default.nix b/hosts/Aloria/default.nix index 9259cf3..85c0651 100644 --- a/hosts/Aloria/default.nix +++ b/hosts/Aloria/default.nix @@ -76,6 +76,15 @@ in { }; }; + systemd.network.enable = true; + networking.useNetworkd = true; + systemd.network.config.networkConfig = { + ManageForeignRoutingPolicyRules = false; + ManageForeignRoutes = false; + SpeedMeter = true; + }; + systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false; + networking.wg-quick.interfaces = { Tunnel = { address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ]; @@ -106,4 +115,8 @@ in { }]; }; }; + systemd.services."wg-quick-OPNsense" = { + serviceConfig = { Restart = "on-failure"; RestartSec = "2s"; }; + unitConfig.StartLimitIntervalSec = 0; + }; }