From 088da23f9ea4ed95da0f7842689774c0ab1837a3 Mon Sep 17 00:00:00 2001 From: Majiir Paktu Date: Mon, 2 Oct 2023 21:50:52 -0400 Subject: [PATCH] nixos/test-instrumentation: fix unsetting of defaultGateway The empty string is coerced to an attrset: { address = ""; interface = null; metric = null; } The new defaultGateway logic (correctly) complains that interface must be defined when using networkd. We instead clear defaultGateway by setting it to its actual default value, which is null. --- nixos/modules/testing/test-instrumentation.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/testing/test-instrumentation.nix b/nixos/modules/testing/test-instrumentation.nix index 6dc4091bad17..c91e54f5a4d7 100644 --- a/nixos/modules/testing/test-instrumentation.nix +++ b/nixos/modules/testing/test-instrumentation.nix @@ -128,7 +128,7 @@ in boot.consoleLogLevel = 7; # Prevent tests from accessing the Internet. - networking.defaultGateway = mkOverride 150 ""; + networking.defaultGateway = mkOverride 150 null; networking.nameservers = mkOverride 150 [ ]; system.requiredKernelConfig = with config.lib.kernelConfig; [