summaryrefslogtreecommitdiff
path: root/awesome
diff options
context:
space:
mode:
authorBrian Picciano <me@mediocregopher.com>2024-06-17 12:43:47 +0200
committerBrian Picciano <me@mediocregopher.com>2024-06-17 12:43:47 +0200
commit698b92d7fb26680ebb0328c5c6c985071ff79a0a (patch)
treeb51e7b3dff0053503a2b6bdad789f3a17a07f969 /awesome
parent4576644b8f37f71fe82c51e95d1dc06615ef5f14 (diff)
Fix X server not picking up system library files
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}
'';