nixos treewide: don't set MODULE_DIR

This commit is contained in:
Nikolay Amiantov 2016-08-14 13:01:14 +03:00
parent b2ebecd9e5
commit 1f63958772
8 changed files with 1 additions and 17 deletions

View File

@ -75,7 +75,6 @@ in
serviceConfig = { serviceConfig = {
ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}"; ExecStart = "${bumblebee}/bin/bumblebeed --use-syslog -g ${cfg.group} --driver ${cfg.driver}";
}; };
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
}; };
}; };
} }

View File

@ -36,7 +36,6 @@ in
# and load it back on resume # and load it back on resume
powerManagement.resumeCommands = '' powerManagement.resumeCommands = ''
export MODULE_DIR=/run/current-system/kernel-modules/lib/modules
${pkgs.kmod}/bin/modprobe -v facetimehd ${pkgs.kmod}/bin/modprobe -v facetimehd
''; '';

View File

@ -72,8 +72,6 @@ in
ExecStart = "${tlp}/bin/tlp init start"; ExecStart = "${tlp}/bin/tlp init start";
ExecStop = "${tlp}/bin/tlp init stop"; ExecStop = "${tlp}/bin/tlp init stop";
}; };
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
}; };
tlp-sleep = { tlp-sleep = {
@ -92,8 +90,6 @@ in
ExecStart = "${tlp}/bin/tlp suspend"; ExecStart = "${tlp}/bin/tlp suspend";
ExecStop = "${tlp}/bin/tlp resume"; ExecStop = "${tlp}/bin/tlp resume";
}; };
environment.MODULE_DIR="/run/current-system/kernel-modules/lib/modules/";
}; };
}; };

View File

@ -316,8 +316,7 @@ in
''; '';
systemd.services.systemd-udevd = systemd.services.systemd-udevd =
{ environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules"; { restartTriggers = cfg.packages;
restartTriggers = cfg.packages;
}; };
}; };

View File

@ -228,7 +228,6 @@ in
systemd.services."systemd-modules-load" = systemd.services."systemd-modules-load" =
{ wantedBy = [ "multi-user.target" ]; { wantedBy = [ "multi-user.target" ];
restartTriggers = [ kernelModulesConf ]; restartTriggers = [ kernelModulesConf ];
environment.MODULE_DIR = "/run/booted-system/kernel-modules/lib/modules";
serviceConfig = serviceConfig =
{ # Ignore failed module loads. Typically some of the { # Ignore failed module loads. Typically some of the
# modules in boot.kernelModules are "nice to have but # 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 = { lib.kernelConfig = {
isYes = option: { isYes = option: {
assertion = config: config.isYes option; assertion = config: config.isYes option;

View File

@ -63,8 +63,6 @@ with lib;
echo ${pkgs.kmod}/bin/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";
}; };
} }

View File

@ -207,6 +207,5 @@ exec {logOutFd}>&- {logErrFd}>&-
# Start systemd. # Start systemd.
echo "starting systemd..." echo "starting systemd..."
PATH=/run/current-system/systemd/lib/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 \ LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \
exec systemd exec systemd

View File

@ -96,7 +96,6 @@ in
} // proxy_env; } // proxy_env;
path = [ pkgs.kmod ] ++ (optional (cfg.storageDriver == "zfs") pkgs.zfs); 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; postStart = if cfg.socketActivation then "" else cfg.postStart;