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.

Changed files
+3 -38
nixos
lib
modules
+2 -1
nixos/lib/testing/legacy.nix
···
inherit (lib) mkIf mkOption types;
in
{
-
# This needs options.warnings, which we don't have (yet?).
# imports = [
# (lib.mkRenamedOptionModule [ "machine" ] [ "nodes" "machine" ])
# ];
options = {
···
inherit (lib) mkIf mkOption types;
in
{
+
# 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 = {
+1 -9
nixos/lib/testing/nodes.nix
···
nixpkgs.config.allowAliases = false;
})
testModuleArgs.config.extraBaseModules
-
] ++ optional config.minimal ../../modules/testing/minimal-kernel.nix;
};
···
An attribute set of arbitrary values that will be made available as module arguments during the resolution of module `imports`.
Note that it is not possible to override these from within the NixOS configurations. If you argument is not relevant to `imports`, consider setting {option}`defaults._module.args.<name>` instead.
-
'';
-
};
-
-
minimal = mkOption {
-
type = types.bool;
-
default = false;
-
description = mdDoc ''
-
Enable to configure all [{option}`nodes`](#test-opt-nodes) to run with a minimal kernel.
'';
};
···
nixpkgs.config.allowAliases = false;
})
testModuleArgs.config.extraBaseModules
+
];
};
···
An attribute set of arbitrary values that will be made available as module arguments during the resolution of module `imports`.
Note that it is not possible to override these from within the NixOS configurations. If you argument is not relevant to `imports`, consider setting {option}`defaults._module.args.<name>` instead.
'';
};
-28
nixos/modules/testing/minimal-kernel.nix
···
-
{ 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;
-
}
···