Author: eelco
Date: Tue Mar 20 22:02:27 2012
New Revision: 33312
URL: https://nixos.org/websvn/nix/?rev=33312&sc=1
Log:
* Move the setting of $MODULE_DIR to modprobe.nix.
* Add a slash to the end of $MODULE_DIR, as expected by depmod. (Not
that running depmod from the command line is all that useful, since
you can't use it to update the tree in the Nix store. But at least
commands like "depmod -n" work now.) Reported by Kirill Elagin on
IRC.
Modified:
nixos/trunk/modules/programs/bash/bash.nix
nixos/trunk/modules/programs/bash/profile.sh
nixos/trunk/modules/system/boot/modprobe.nix
Modified: nixos/trunk/modules/programs/bash/bash.nix
==============================================================================
--- nixos/trunk/modules/programs/bash/bash.nix Tue Mar 20 22:00:32 2012
(r33311)
+++ nixos/trunk/modules/programs/bash/bash.nix Tue Mar 20 22:02:27 2012
(r33312)
@@ -30,7 +30,6 @@
source = pkgs.substituteAll {
src = ./profile.sh;
wrapperDir = config.security.wrapperDir;
- modulesTree = config.system.modulesTree;
shellInit = config.environment.shellInit;
};
target = "profile";
Modified: nixos/trunk/modules/programs/bash/profile.sh
==============================================================================
--- nixos/trunk/modules/programs/bash/profile.sh Tue Mar 20 22:00:32
2012 (r33311)
+++ nixos/trunk/modules/programs/bash/profile.sh Tue Mar 20 22:02:27
2012 (r33312)
@@ -14,7 +14,6 @@
# Initialise a bunch of environment variables.
export LOCALE_ARCHIVE=/var/run/current-system/sw/lib/locale/locale-archive
export
LD_LIBRARY_PATH=/var/run/opengl-driver/lib:/var/run/opengl-driver-32/lib # !!!
only set if needed
-export MODULE_DIR=@modulesTree@/lib/modules
export NIXPKGS_CONFIG=/nix/etc/config.nix
export
NIX_PATH=nixpkgs=/etc/nixos/nixpkgs:nixos=/etc/nixos/nixos:nixos-config=/etc/nixos/configuration.nix:services=/etc/nixos/services
export PAGER="less -R"
Modified: nixos/trunk/modules/system/boot/modprobe.nix
==============================================================================
--- nixos/trunk/modules/system/boot/modprobe.nix Tue Mar 20 22:00:32
2012 (r33311)
+++ nixos/trunk/modules/system/boot/modprobe.nix Tue Mar 20 22:02:27
2012 (r33312)
@@ -18,13 +18,13 @@
text =
''
#! ${pkgs.stdenv.shell}
- export MODULE_DIR=${config.system.modulesTree}/lib/modules
+ export MODULE_DIR=${config.system.modulesTree}/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=/var/run/booted-system/kernel-modules/lib/modules
+ MODULE_DIR=/var/run/booted-system/kernel-modules/lib/modules/
fi
exec ${pkgs.module_init_tools}/sbin/modprobe "$@"
@@ -102,6 +102,11 @@
echo ${config.system.sbin.modprobe}/sbin/modprobe >
/proc/sys/kernel/modprobe
'';
+ environment.shellInit =
+ ''
+ export MODULE_DIR=${config.system.modulesTree}/lib/modules/
+ '';
+
};
}
_______________________________________________
nix-commits mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-commits