about summary refs log tree commit diff
path: root/modules/nixos-hardware/dell/xps/15-9550
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos-hardware/dell/xps/15-9550')
-rw-r--r--modules/nixos-hardware/dell/xps/15-9550/README.wiki9
-rw-r--r--modules/nixos-hardware/dell/xps/15-9550/nvidia/default.nix15
2 files changed, 23 insertions, 1 deletions
diff --git a/modules/nixos-hardware/dell/xps/15-9550/README.wiki b/modules/nixos-hardware/dell/xps/15-9550/README.wiki
index c0e9158a883e..93d33ab9c6f7 100644
--- a/modules/nixos-hardware/dell/xps/15-9550/README.wiki
+++ b/modules/nixos-hardware/dell/xps/15-9550/README.wiki
@@ -5,12 +5,19 @@ Most of this I presume also applies to the XPS 13 1530, the 13" variant.
 == Tested Hardware ==
 
 * CPU: Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz
-* RAM: 16 GB
+* RAM: 32 GB
 * HDD: 512 GiB SSD
 * Screen: 15" 4k (3840✕2160)
 * Graphics: NVIDIA Corporation GM107M, with Intel Graphics too.
 * Input: Touchscreen and trackpad.
 
+== NVIDIA Offload ==
+
+In order to run a program on the NVIDIA gpu, you can use the `nvidia-offload` function, for example:
+```
+nvidia-offload `nix-shell -p glxinfo --run 'glxgears'`
+```
+This is a short bash script that sets the proper environment variables and calls your command.
 
 == Firmware Configuration ==
 
diff --git a/modules/nixos-hardware/dell/xps/15-9550/nvidia/default.nix b/modules/nixos-hardware/dell/xps/15-9550/nvidia/default.nix
new file mode 100644
index 000000000000..451b6eb75315
--- /dev/null
+++ b/modules/nixos-hardware/dell/xps/15-9550/nvidia/default.nix
@@ -0,0 +1,15 @@
+{ lib, pkgs, ... }:
+{
+  imports = [
+    ../default.nix
+    ../../../../common/gpu/nvidia.nix
+  ];
+
+  hardware.nvidia.prime = {
+    # Bus ID of the Intel GPU.
+    intelBusId = lib.mkDefault "PCI:0:2:0";
+
+    # Bus ID of the NVIDIA GPU.
+    nvidiaBusId = lib.mkDefault "PCI:1:0:0";
+  };
+}