nixpkgs/nixos/modules/services
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
..
admin cleanup redundant text in modules utilizing mkEnableOption 2019-04-20 14:44:02 +02:00
amqp nixos/rabbitmq: replace deprecated usage of PermissionsStartOnly 2019-04-13 07:00:57 -04:00
audio nixos/mpd: replace deprecated usage of PermissionsStartOnly 2019-04-13 07:00:56 -04:00
backup Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
cluster Merge pull request #57523 from mayflower/kube-apiserver-preferred-address-types 2019-05-18 09:57:12 +00:00
computing
continuous-integration treewide: Remove usage of isNull 2019-04-29 14:05:50 +02:00
databases nixos/postgresql: add ensureDatabases & ensureUsers options (#56720) 2019-05-20 10:58:48 +02:00
desktops nixos/geoclue2: make configurable, can whitelist applications 2019-05-16 18:46:07 -04:00
development
editors
games Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
hardware cleanup redundant text in modules utilizing mkEnableOption 2019-04-20 14:44:02 +02:00
logging Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
mail treewide: Remove usage of isNull 2019-04-29 14:05:50 +02:00
misc Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
monitoring Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
network-filesystems nixos/ipfs: replace deprecated usage of PermissionsStartOnly 2019-04-13 07:00:59 -04:00
networking nixos/bitcoind: add bitcoind service 2019-05-22 15:48:57 -04:00
printing
scheduling Merge pull request #51918 from bobvanderlinden/var-run 2019-04-07 20:09:46 +02:00
search treewide: Remove usage of isNull 2019-04-29 14:05:50 +02:00
security Merge pull request #61546 from cizra/libfprint-vfs0090 2019-05-20 14:16:34 -04:00
system Merge pull request #53444 from wedens/earlyoom-notifications 2019-04-27 21:34:37 +09:00
torrent nixos/peerflix: replace deprecated usage of PermissionsStartOnly 2019-04-13 07:01:00 -04:00
ttys
web-apps nixos/nextcloud: Improve autoUpdateApps description string 2019-05-22 19:07:42 +02:00
web-servers Merge pull request #60406 from JohnAZoidberg/remove-isnull 2019-05-18 09:36:24 +00:00
x11 nixos: Don't set LD_LIBRARY_PATH for graphics drivers that don't need it. 2019-05-26 10:23:46 +02:00