* Move the modulesTree and modprobe options to the kernel.nix module.
svn path=/nixos/branches/modular-nixos/; revision=15747
This commit is contained in:
parent
690416cf1a
commit
700a1f8f21
@ -134,7 +134,42 @@ let
|
|||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
system.modulesTree = mkOption {
|
||||||
|
internal = true;
|
||||||
|
default = [];
|
||||||
|
description = "
|
||||||
|
Tree of kernel modules. This includes the kernel, plus modules
|
||||||
|
built outside of the kernel. Combine these into a single tree of
|
||||||
|
symlinks because modprobe only supports one directory.
|
||||||
|
";
|
||||||
|
merge = pkgs.lib.mergeListOption;
|
||||||
|
|
||||||
|
# Convert the list of path to only one path.
|
||||||
|
apply = pkgs.aggregateModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.sbin.modprobe = mkOption {
|
||||||
|
# should be moved in module-init-tools
|
||||||
|
internal = true;
|
||||||
|
default = pkgs.writeTextFile {
|
||||||
|
name = "modprobe";
|
||||||
|
destination = "/sbin/modprobe";
|
||||||
|
executable = true;
|
||||||
|
text =
|
||||||
|
''
|
||||||
|
#! ${pkgs.stdenv.shell}
|
||||||
|
export MODULE_DIR=${config.system.modulesTree}/lib/modules
|
||||||
|
exec ${pkgs.module_init_tools}/sbin/modprobe "$@"
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
description = ''
|
||||||
|
Wrapper around modprobe that sets the path to the modules
|
||||||
|
tree.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#! @shell@
|
|
||||||
export MODULE_DIR=@modulesTree@/lib/modules
|
|
||||||
exec @module_init_tools@/sbin/modprobe "$@"
|
|
@ -95,37 +95,7 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
modulesTree = mkOption {
|
|
||||||
internal = true;
|
|
||||||
default = [];
|
|
||||||
description = "
|
|
||||||
Tree of kernel modules. This includes the kernel, plus modules
|
|
||||||
built outside of the kernel. Combine these into a single tree of
|
|
||||||
symlinks because modprobe only supports one directory.
|
|
||||||
";
|
|
||||||
merge = pkgs.lib.mergeListOption;
|
|
||||||
|
|
||||||
# Convert the list of path to only one path.
|
|
||||||
apply = pkgs.aggregateModules;
|
|
||||||
};
|
|
||||||
|
|
||||||
sbin = {
|
sbin = {
|
||||||
modprobe = mkOption {
|
|
||||||
# should be moved in module-init-tools
|
|
||||||
internal = true;
|
|
||||||
default = pkgs.substituteAll {
|
|
||||||
dir = "sbin";
|
|
||||||
src = ./modprobe;
|
|
||||||
isExecutable = true;
|
|
||||||
inherit (pkgs) module_init_tools;
|
|
||||||
inherit (config.system) modulesTree;
|
|
||||||
};
|
|
||||||
description = ''
|
|
||||||
Wrapper around modprobe that sets the path to the modules
|
|
||||||
tree.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
# !!! The mount option should not stay in /system/option.nix
|
# !!! The mount option should not stay in /system/option.nix
|
||||||
mount = mkOption {
|
mount = mkOption {
|
||||||
internal = true;
|
internal = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user