summary refs log tree commit diff
path: root/nixos/modules/hardware/opengl.nix
diff options
context:
space:
mode:
authorNikolay Amiantov <ab@fmap.me>2017-01-31 04:20:07 +0300
committerNikolay Amiantov <ab@fmap.me>2017-01-31 04:38:09 +0300
commit8d379ddfef1e7bcf123d8b0092f9924bf5232c07 (patch)
tree8c93f77ddef58a05730c9e5f82fc8061847f2fb0 /nixos/modules/hardware/opengl.nix
parent98b0195dde0c2dad83759e314affc2d085d839cc (diff)
downloadnixlib-8d379ddfef1e7bcf123d8b0092f9924bf5232c07.tar
nixlib-8d379ddfef1e7bcf123d8b0092f9924bf5232c07.tar.gz
nixlib-8d379ddfef1e7bcf123d8b0092f9924bf5232c07.tar.bz2
nixlib-8d379ddfef1e7bcf123d8b0092f9924bf5232c07.tar.lz
nixlib-8d379ddfef1e7bcf123d8b0092f9924bf5232c07.tar.xz
nixlib-8d379ddfef1e7bcf123d8b0092f9924bf5232c07.tar.zst
nixlib-8d379ddfef1e7bcf123d8b0092f9924bf5232c07.zip
opengl service: use option for XDG_DATA_DIRS
Diffstat (limited to 'nixos/modules/hardware/opengl.nix')
-rw-r--r--nixos/modules/hardware/opengl.nix9
1 files changed, 3 insertions, 6 deletions
diff --git a/nixos/modules/hardware/opengl.nix b/nixos/modules/hardware/opengl.nix
index 5e38a9880961..486fe7c1cd8f 100644
--- a/nixos/modules/hardware/opengl.nix
+++ b/nixos/modules/hardware/opengl.nix
@@ -133,13 +133,10 @@ in
       '';
 
     environment.sessionVariables.LD_LIBRARY_PATH =
-      [ "/run/opengl-driver/lib" "/run/opengl-driver-32/lib" ];
+      [ "/run/opengl-driver/lib" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/lib";
 
-    environment.extraInit = ''
-      export XDG_DATA_DIRS=$XDG_DATA_DIRS:/run/opengl-driver/share
-    '' + optionalString cfg.driSupport32Bit ''
-      export XDG_DATA_DIRS=$XDG_DATA_DIRS:/run/opengl-driver-32/share
-    '';
+    environment.variables.XDG_DATA_DIRS =
+      [ "/run/opengl-driver/share" ] ++ optional cfg.driSupport32Bit "/run/opengl-driver-32/share";
 
     hardware.opengl.package = mkDefault (makePackage pkgs);
     hardware.opengl.package32 = mkDefault (makePackage pkgs_i686);