summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-12-04 01:36:22 +0000
committertv <tv@krebsco.de>2026-12-04 15:44:35 +0000
commit1524f1fdb9c18720292db04f47c5f926a8023707 (patch)
treebde8e850d537ae021137e15234c133b91b4e5580
parent51f7504cb1fa09c1df50f480a240e7d34ca78c75 (diff)
x11: nvidia
From the dirt.
-rw-r--r--configs/x11/xserver.nix13
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;