From b0e17891f2d27c2661a5b7a03d77bfec64b508e4 Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Sun, 7 May 2023 17:47:29 +0200 Subject: [PATCH] nixos/testing/nodes.nix: Do not rely on disabledModules It's just not necessary. --- nixos/lib/testing/nodes.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index 0197097e8884..6e439fd814db 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -10,6 +10,7 @@ let mkIf mkOption mkForce optional + optionalAttrs types ; @@ -26,7 +27,7 @@ let { virtualisation.qemu.package = testModuleArgs.config.qemu.package; }) - ({ + (optionalAttrs (!config.node.pkgsReadOnly) { key = "nodes.nix-pkgs"; config = { # Ensure we do not use aliases. Ideally this is only set @@ -142,7 +143,6 @@ in defaults = mkIf config.node.pkgsReadOnly { nixpkgs.pkgs = config.node.pkgs; imports = [ ../../modules/misc/nixpkgs/read-only.nix ]; - disabledModules = [{ key = "nodes.nix-pkgs"; }]; }; };