nixpkgs-suyu/nixos/modules/hardware
Ambroz Bizjak 370d3af0c4 nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it.
A new internal option `hardware.opengl.setLdLibraryPath` is added which controls if `LD_LIBRARY_PATH` should be set to `/run/opengl-driver(-32)/lib`. It is false by default and is meant to be set to true by any driver which requires it. If this option is false, then `opengl.nix` and `xserver.nix` will not set `LD_LIBRARY_PATH`.

Currently Mesa and NVidia drivers don't set `setLdLibraryPath` because they work with libglvnd and do not override libraries, while `amdgpu-pro`, `ati` and `parallels-guest` set it to true (the former two really need it, the last one doesn't build so is presumed to).

Additionally, the `libPath` attribute within entries of `services.xserver.drivers` is removed. This made `xserver.nix` add the driver path directly to the `LD_LIBRARY_PATH` for the display manager (including X server). Not only is it redundant when the driver is added to `hardware.opengl.package` (assuming that `hardware.opengl.enable` is true), in fact all current drivers except `ati` set it incorrectly to the package path instead of package/lib.

This removal of `LD_LIBRARY_PATH` could break certain packages using CUDA, but only those that themselves load `libcuda` or other NVidia driver libraries using `dlopen` (not if they just use `cudatoolkit`). A few have already been fixed but it is practically impossible to test all because most packages using CUDA are libraries/frameworks without a simple way to test.

Fixes #11434 if only Mesa or NVidia graphics drivers are used.
2019-05-26 10:23:46 +02:00
..
cpu
network [bot] nixos/*: remove unused arguments in lambdas 2018-07-20 20:56:59 +00:00
raid nixos/hpsa: use https 2018-11-24 23:05:10 +01:00
sensor
video nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it. 2019-05-26 10:23:46 +02:00
acpilight.nix acpilight: init at 1.1 2019-02-24 00:09:11 +03:00
all-firmware.nix nixos/all-firmware: Enable facetimehd only for i686/x86_64 2019-05-06 10:49:42 +02:00
bladeRF.nix nixos/hardware/bladeRF: init at 2.0.2 2018-12-18 08:11:18 +00:00
brightnessctl.nix brightnessctl: init at 0.3.2 (#42102) 2018-06-16 18:15:42 -04:00
ckb-next.nix nixos/ckb: Add option to restrict access to the devices to a particular group 2018-11-15 16:49:38 +00:00
digitalbitbox.nix digitalbitbox: init at 2.2.2 (#33787) 2018-02-27 22:40:22 +00:00
ksm.nix
ledger.nix nixos/ledger: init 2019-02-22 19:26:47 +01:00
logitech.nix logitech (nixos): support module for logitech input devices 2019-03-19 09:58:57 +08:00
mcelog.nix
nitrokey.nix nixos/modules: users.(extraUsers|extraGroup->users|group) 2018-06-30 03:02:58 +02:00
onlykey.nix config.hardware.onlykey configuration option 2018-03-18 12:49:13 +07:00
onlykey.udev config.hardware.onlykey configuration option 2018-03-18 12:49:13 +07:00
opengl.nix nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it. 2019-05-26 10:23:46 +02:00
pcmcia.nix
steam-hardware.nix nixos/steam-hardware: module init 2018-09-30 11:22:32 +02:00
usb-wwan.nix