From 451e1f067b2087a9d3762407e9b03fc7abe37fa4 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 17 Mar 2022 21:59:04 +0100 Subject: [PATCH] modules/networking-client: add connectivity check --- modules/networking-client/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/modules/networking-client/default.nix b/modules/networking-client/default.nix index 432d788..0884ad5 100644 --- a/modules/networking-client/default.nix +++ b/modules/networking-client/default.nix @@ -1,8 +1,16 @@ { networking.useDHCP = false; - networking.networkmanager.dns = "systemd-resolved"; - networking.networkmanager.enableStrongSwan = false; + networking.networkmanager = { + dns = "systemd-resolved"; + enableStrongSwan = false; + extraConfig = '' + [connectivity] + uri=http://whoami.privatevoid.net/online + response=CONNECTED_GLOBAL + interval=120 + ''; + }; services.resolved = { enable = true; fallbackDns = [ "10.1.0.1" ];