nixpkgs/nixos/modules
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
..
config Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
hardware nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it. 2019-05-26 10:23:46 +02:00
i18n/input-method docs: format 2018-09-29 20:51:11 -04:00
installer Merge pull request #60207 from volth/patch-329 2019-05-22 15:32:00 +03:00
misc nixos/factorio: sandbox service using systemd 2019-05-17 10:25:49 +02:00
profiles nixos/hardened: use graphene-hardened malloc by default 2019-05-07 13:45:39 +02:00
programs Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
security FIx some malformed XML in option descriptions 2019-05-13 09:15:17 +02:00
services nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it. 2019-05-26 10:23:46 +02:00
system Merge pull request #61036 from cdepillabout/nixos-memtest-loader 2019-05-20 21:42:40 -05:00
tasks cleanup redundant text in modules utilizing mkEnableOption 2019-04-20 14:44:02 +02:00
testing types.optionSet: deprecate and remove last usages 2019-01-31 00:41:10 +02:00
virtualisation nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it. 2019-05-26 10:23:46 +02:00
module-list.nix nixos/bitcoind: add bitcoind service 2019-05-22 15:48:57 -04:00
rename.nix winstone: drop package and service 2019-05-15 20:30:48 +02:00