summaryrefslogtreecommitdiff
path: root/awesome
diff options
context:
space:
mode:
Diffstat (limited to 'awesome')
-rw-r--r--awesome/default.nix12
1 files changed, 12 insertions, 0 deletions
diff --git a/awesome/default.nix b/awesome/default.nix
index ca61ec5..acc6375 100644
--- a/awesome/default.nix
+++ b/awesome/default.nix
@@ -64,6 +64,10 @@ EOF
set -e -x
+ # Set during startup of X server, but we don't want it inherited by
+ # everything downstream.
+ unset LD_LIBRARY_PATH
+
# Turn off powersaving (fuck the environment)
${pkgs.xorg.xset}/bin/xset -dpms
${pkgs.xorg.xset}/bin/xset s off
@@ -103,6 +107,14 @@ EOF
awesome = pkgs.writeShellScriptBin "awesome" ''
export XORGCONFIG=${xorgConf}
+
+ # set the LD_LIBRARY_PATH to search both the libraries needed by X, but also
+ # those on the host, so that the video driver has access to them if it needs
+ # it.
+ source "${pkgs.ldUtils}"
+ x_ld_lib_path="$(bin_ld_lib_path "${pkgs.xorg.xinit}/bin/xinit")"
+ export LD_LIBRARY_PATH="$x_ld_lib_path":"$(host_ld_lib_path)"
+
exec startx ${awesomeInner}
'';