diff options
author | Nikolay Amiantov <ab@fmap.me> | 2016-08-14 13:00:52 +0300 |
---|---|---|
committer | Nikolay Amiantov <ab@fmap.me> | 2016-08-16 00:19:25 +0300 |
commit | b2ebecd9e50471ec967ab9cdb2aba793d75cb747 (patch) | |
tree | e382030e2b9cd17c3a0d7a21ed39656219009ff6 /nixos/modules/system/boot/modprobe.nix | |
parent | 1afd2506768760a6a55d23c47dc064f732f27807 (diff) | |
download | nixlib-b2ebecd9e50471ec967ab9cdb2aba793d75cb747.tar nixlib-b2ebecd9e50471ec967ab9cdb2aba793d75cb747.tar.gz nixlib-b2ebecd9e50471ec967ab9cdb2aba793d75cb747.tar.bz2 nixlib-b2ebecd9e50471ec967ab9cdb2aba793d75cb747.tar.lz nixlib-b2ebecd9e50471ec967ab9cdb2aba793d75cb747.tar.xz nixlib-b2ebecd9e50471ec967ab9cdb2aba793d75cb747.tar.zst nixlib-b2ebecd9e50471ec967ab9cdb2aba793d75cb747.zip |
modprobe service: drop kmod wrapper
Diffstat (limited to 'nixos/modules/system/boot/modprobe.nix')
-rw-r--r-- | nixos/modules/system/boot/modprobe.nix | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix index 9bb10eac9880..91f440535a48 100644 --- a/nixos/modules/system/boot/modprobe.nix +++ b/nixos/modules/system/boot/modprobe.nix @@ -8,41 +8,6 @@ with lib; options = { - system.sbin.modprobe = mkOption { - internal = true; - default = pkgs.stdenv.mkDerivation { - name = "modprobe"; - buildCommand = '' - mkdir -p $out/bin - for i in ${pkgs.kmod}/sbin/*; do - name=$(basename $i) - echo "$text" > $out/bin/$name - echo 'exec '$i' "$@"' >> $out/bin/$name - chmod +x $out/bin/$name - done - ln -s bin $out/sbin - ''; - text = - '' - #! ${pkgs.stdenv.shell} - export MODULE_DIR=/run/current-system/kernel-modules/lib/modules - - # Fall back to the kernel modules used at boot time if the - # modules in the current configuration don't match the - # running kernel. - if [ ! -d "$MODULE_DIR/$(${pkgs.coreutils}/bin/uname -r)" ]; then - MODULE_DIR=/run/booted-system/kernel-modules/lib/modules/ - fi - - ''; - meta.priority = 4; - }; - description = '' - Wrapper around modprobe that sets the path to the modules - tree. - ''; - }; - boot.blacklistedKernelModules = mkOption { type = types.listOf types.str; default = []; @@ -87,7 +52,7 @@ with lib; ''; environment.etc."modprobe.d/debian.conf".source = pkgs.kmod-debian-aliases; - environment.systemPackages = [ config.system.sbin.modprobe pkgs.kmod ]; + environment.systemPackages = [ pkgs.kmod ]; system.activationScripts.modprobe = '' @@ -95,7 +60,7 @@ with lib; # in the right location in the Nix store for kernel modules). # We need this when the kernel (or some module) auto-loads a # module. - echo ${config.system.sbin.modprobe}/sbin/modprobe > /proc/sys/kernel/modprobe + echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe ''; environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules"; |