From 6b41f1132c0dab25d98a74c28aafdc524131d0f5 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Sun, 14 Aug 2016 13:01:14 +0300 Subject: nixos treewide: don't set MODULE_DIR --- nixos/modules/hardware/video/bumblebee.nix | 1 - nixos/modules/hardware/video/webcam/facetimehd.nix | 1 - nixos/modules/services/hardware/tlp.nix | 4 ---- nixos/modules/services/hardware/udev.nix | 3 +-- nixos/modules/system/boot/kernel.nix | 5 ----- nixos/modules/system/boot/modprobe.nix | 2 -- nixos/modules/system/boot/stage-2-init.sh | 1 - nixos/modules/virtualisation/docker.nix | 1 - 8 files changed, 1 insertion(+), 17 deletions(-) diff --git a/nixos/modules/hardware/video/bumblebee.nix b/nixos/modules/hardware/video/bumblebee.nix index b10846ac18a1..69db518ab21c 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 2a2fcf3057d4..d311f600c319 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 5ab7daafa85b..281d02a8c65e 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 fb44790ab1f1..7c4c93d0fcb3 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 a6bbca9b30bb..0f342f44fe76 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 91f440535a48..b915a98d5375 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 4a7f073ea8ad..c5a14f0766d5 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 97b2927cf1bd..ebc2be087a5b 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; -- cgit 1.4.1