diff options
| -rw-r--r-- | configs/x11/xserver.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/configs/x11/xserver.nix b/configs/x11/xserver.nix index 816ffbc8..dcc0821a 100644 --- a/configs/x11/xserver.nix +++ b/configs/x11/xserver.nix @@ -116,6 +116,9 @@ in { (pkgs.writeDashBin "xinit" '' set -efu + # For the nvidia driver's libraries. + export LD_LIBRARY_PATH=/run/opengl-driver/lib:/run/opengl-driver-32/lib + tty=$(${pkgs.coreutils}/bin/tty) i=''${tty#/dev/tty} @@ -151,6 +154,16 @@ in { Section.Device.GPU.Driver = "amdgpu"; }; } + // lib.optionalAttrs + (lib.any (pkg: pkg.pname == "nvidia-x11") config.services.xserver.modules) + { + "10-nvidia-x11.conf" = { + Section.Device.GPU = { + Driver = "nvidia"; + Option.SidebandSocketPath = "/run/nvidia-xdriver/"; + }; + }; + } // { "10-base.conf" = { Section.ServerFlags.default.Option.DontZap = true; |
