summary refs log tree commit diff
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2016-08-14 13:01:14 +0300
committerNikolay Amiantov <ab@fmap.me>2016-08-16 00:19:25 +0300
commit1f639587729daf6c34535addbc35fd6e5c816ffc (patch)
tree2c9f6d40471e26eea0161294fe846bb32fe6a8ea
parentb2ebecd9e50471ec967ab9cdb2aba793d75cb747 (diff)
downloadnixpkgs-1f639587729daf6c34535addbc35fd6e5c816ffc.tar
nixpkgs-1f639587729daf6c34535addbc35fd6e5c816ffc.tar.gz
nixpkgs-1f639587729daf6c34535addbc35fd6e5c816ffc.tar.bz2
nixpkgs-1f639587729daf6c34535addbc35fd6e5c816ffc.tar.lz
nixpkgs-1f639587729daf6c34535addbc35fd6e5c816ffc.tar.xz
nixpkgs-1f639587729daf6c34535addbc35fd6e5c816ffc.tar.zst
nixpkgs-1f639587729daf6c34535addbc35fd6e5c816ffc.zip
nixos treewide: don't set MODULE_DIR
-rw-r--r--nixos/modules/hardware/video/bumblebee.nix1
-rw-r--r--nixos/modules/hardware/video/webcam/facetimehd.nix1
-rw-r--r--nixos/modules/services/hardware/tlp.nix4
-rw-r--r--nixos/modules/services/hardware/udev.nix3
-rw-r--r--nixos/modules/system/boot/kernel.nix5
-rw-r--r--nixos/modules/system/boot/modprobe.nix2
-rw-r--r--nixos/modules/system/boot/stage-2-init.sh1
-rw-r--r--nixos/modules/virtualisation/docker.nix1
8 files changed, 1 insertions, 17 deletions
diff --git a/nixos/modules/hardware/video/bumblebee.nix b/nixos/modules/hardware/video/bumblebee.nix
index b10846ac18a..69db518ab21 100644
--- a/nixos/modules/hardware/video/bumblebee.nix
+++ b/nixos/modules/hardware/video/bumblebee.nix
@@ -75,7 +75,6 @@ in
       serviceConfig = {
         ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}";
       };
-      environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
     };
   };
 }
diff --git a/nixos/modules/hardware/video/webcam/facetimehd.nix b/nixos/modules/hardware/video/webcam/facetimehd.nix
index 2a2fcf3057d..d311f600c31 100644
--- a/nixos/modules/hardware/video/webcam/facetimehd.nix
+++ b/nixos/modules/hardware/video/webcam/facetimehd.nix
@@ -36,7 +36,6 @@ in
 
     # and load it back on resume
     powerManagement.resumeCommands = ''
-      export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
       ${pkgs.kmod}/bin/modprobe -v facetimehd
     '';
 
diff --git a/nixos/modules/services/hardware/tlp.nix b/nixos/modules/services/hardware/tlp.nix
index 5ab7daafa85..281d02a8c65 100644
--- a/nixos/modules/services/hardware/tlp.nix
+++ b/nixos/modules/services/hardware/tlp.nix
@@ -72,8 +72,6 @@ in
           ExecStart = "${tlp}/bin/tlp init start";
           ExecStop = "${tlp}/bin/tlp init stop";
         };
-
-        environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
       };
 
       tlp-sleep = {
@@ -92,8 +90,6 @@ in
           ExecStart = "${tlp}/bin/tlp suspend";
           ExecStop = "${tlp}/bin/tlp resume";
         };
-
-        environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
       };
     };
 
diff --git a/nixos/modules/services/hardware/udev.nix b/nixos/modules/services/hardware/udev.nix
index fb44790ab1f..7c4c93d0fcb 100644
--- a/nixos/modules/services/hardware/udev.nix
+++ b/nixos/modules/services/hardware/udev.nix
@@ -316,8 +316,7 @@ in
       '';
 
     systemd.services.systemd-udevd =
-      { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
-        restartTriggers = cfg.packages;
+      { restartTriggers = cfg.packages;
       };
 
   };
diff --git a/nixos/modules/system/boot/kernel.nix b/nixos/modules/system/boot/kernel.nix
index a6bbca9b30b..0f342f44fe7 100644
--- a/nixos/modules/system/boot/kernel.nix
+++ b/nixos/modules/system/boot/kernel.nix
@@ -228,7 +228,6 @@ in
     systemd.services."systemd-modules-load" =
       { wantedBy = [ "multi-user.target" ];
         restartTriggers = [ kernelModulesConf ];
-        environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
         serviceConfig =
           { # Ignore failed module loads.  Typically some of the
             # modules in ‘boot.kernelModules’ are "nice to have but
@@ -238,10 +237,6 @@ in
           };
       };
 
-    systemd.services.kmod-static-nodes =
-      { environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
-      };
-
     lib.kernelConfig = {
       isYes = option: {
         assertion = config: config.isYes option;
diff --git a/nixos/modules/system/boot/modprobe.nix b/nixos/modules/system/boot/modprobe.nix
index 91f440535a4..b915a98d537 100644
--- a/nixos/modules/system/boot/modprobe.nix
+++ b/nixos/modules/system/boot/modprobe.nix
@@ -63,8 +63,6 @@ with lib;
         echo ${pkgs.kmod}/bin/modprobe > /proc/sys/kernel/modprobe
       '';
 
-    environment.sessionVariables.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
-
   };
 
 }
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh
index 4a7f073ea8a..c5a14f0766d 100644
--- a/nixos/modules/system/boot/stage-2-init.sh
+++ b/nixos/modules/system/boot/stage-2-init.sh
@@ -207,6 +207,5 @@ exec {logOutFd}>&- {logErrFd}>&-
 # Start systemd.
 echo "starting systemd..."
 PATH=/run/current-system/systemd/lib/systemd \
-    MODULE_DIR=/run/booted-system/kernel-modules/lib/modules \
     LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
     exec systemd
diff --git a/nixos/modules/virtualisation/docker.nix b/nixos/modules/virtualisation/docker.nix
index 97b2927cf1b..ebc2be087a5 100644
--- a/nixos/modules/virtualisation/docker.nix
+++ b/nixos/modules/virtualisation/docker.nix
@@ -96,7 +96,6 @@ in
         } // proxy_env;
 
         path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs);
-        environment.MODULE_DIR = "/run/current-system/kernel-modules/lib/modules";
 
         postStart = if cfg.socketActivation then "" else cfg.postStart;