From f677cbabe93e039a9d4ac995a49f9ca7991d0a9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Na=C3=AFm=20Favier?= Date: Tue, 20 Dec 2022 14:28:47 +0100 Subject: [PATCH] nixos/tests: remove minimal-kernel module It's not used, doesn't build, and seems like the only reason to have `manualConfig` take `stdenv` as an argument. --- nixos/lib/testing/legacy.nix | 3 ++- nixos/lib/testing/nodes.nix | 10 +-------- nixos/modules/testing/minimal-kernel.nix | 28 ------------------------ 3 files changed, 3 insertions(+), 38 deletions(-) delete mode 100644 nixos/modules/testing/minimal-kernel.nix diff --git a/nixos/lib/testing/legacy.nix b/nixos/lib/testing/legacy.nix index 868b8b65b17..b3105755660 100644 --- a/nixos/lib/testing/legacy.nix +++ b/nixos/lib/testing/legacy.nix @@ -3,9 +3,10 @@ let inherit (lib) mkIf mkOption types; in { - # This needs options.warnings, which we don't have (yet?). + # This needs options.warnings and options.assertions, which we don't have (yet?). # imports = [ # (lib.mkRenamedOptionModule [ "machine" ] [ "nodes" "machine" ]) + # (lib.mkRemovedOptionModule [ "minimal" ] "The minimal kernel module was removed as it was broken and not used any more in nixpkgs.") # ]; options = { diff --git a/nixos/lib/testing/nodes.nix b/nixos/lib/testing/nodes.nix index 8e620c96b3b..c538ab468c5 100644 --- a/nixos/lib/testing/nodes.nix +++ b/nixos/lib/testing/nodes.nix @@ -23,7 +23,7 @@ let nixpkgs.config.allowAliases = false; }) testModuleArgs.config.extraBaseModules - ] ++ optional config.minimal ../../modules/testing/minimal-kernel.nix; + ]; }; @@ -78,14 +78,6 @@ in ''; }; - minimal = mkOption { - type = types.bool; - default = false; - description = mdDoc '' - Enable to configure all [{option}`nodes`](#test-opt-nodes) to run with a minimal kernel. - ''; - }; - nodesCompat = mkOption { internal = true; description = mdDoc '' diff --git a/nixos/modules/testing/minimal-kernel.nix b/nixos/modules/testing/minimal-kernel.nix deleted file mode 100644 index 7c2b9c05cf9..00000000000 --- a/nixos/modules/testing/minimal-kernel.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, pkgs, lib, ... }: - -let - configfile = builtins.storePath (builtins.toFile "config" (lib.concatStringsSep "\n" - (map (builtins.getAttr "configLine") config.system.requiredKernelConfig)) - ); - - origKernel = pkgs.buildLinux { - inherit (pkgs.linux) src version stdenv; - inherit configfile; - allowImportFromDerivation = true; - kernelPatches = [ pkgs.kernelPatches.cifs_timeout_2_6_38 ]; - }; - - kernel = origKernel // (derivation (origKernel.drvAttrs // { - configurePhase = '' - runHook preConfigure - mkdir ../build - make $makeFlags "''${makeFlagsArray[@]}" mrproper - make $makeFlags "''${makeFlagsArray[@]}" KCONFIG_ALLCONFIG=${configfile} allnoconfig - runHook postConfigure - ''; - })); - - kernelPackages = pkgs.linuxPackagesFor kernel; -in { - boot.kernelPackages = kernelPackages; -}