From 698b92d7fb26680ebb0328c5c6c985071ff79a0a Mon Sep 17 00:00:00 2001 From: Brian Picciano Date: Mon, 17 Jun 2024 12:43:47 +0200 Subject: Fix X server not picking up system library files --- awesome/default.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'awesome') 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} ''; -- cgit v1.2.3