From be4be0370ffc3dd852fd4c062f971b6eac47f8f4 Mon Sep 17 00:00:00 2001 From: Shogo Takata Date: Sat, 8 Nov 2025 16:25:37 -0800 Subject: [PATCH] nixosTests.nix-config: fix build by unsetting NIX_PATH This fixes the build failure of `nixosTests.nix-config`. The test was failing because NIX_PATH overrides the contents of config. See also: https://github.com/NixOS/nix/issues/13849 --- nixos/tests/nix-config.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/tests/nix-config.nix b/nixos/tests/nix-config.nix index b39baf3f6b50..005dd71b2f63 100644 --- a/nixos/tests/nix-config.nix +++ b/nixos/tests/nix-config.nix @@ -14,7 +14,8 @@ start_all() machine.wait_for_unit("nix-daemon.socket") # regression test for the workaround for https://github.com/NixOS/nix/issues/9487 - print(machine.succeed("nix-instantiate --find-file extra")) - print(machine.succeed("nix-instantiate --find-file nonextra")) + # unset NIX_PATH because environtment overrides the config + print(machine.succeed("env -u NIX_PATH nix-instantiate --find-file extra")) + print(machine.succeed("env -u NIX_PATH nix-instantiate --find-file nonextra")) ''; }