about summary refs log tree commit diff
path: root/modules/nixos-hardware/lenovo/thinkpad/e470/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/nixos-hardware/lenovo/thinkpad/e470/default.nix')
-rw-r--r--modules/nixos-hardware/lenovo/thinkpad/e470/default.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/nixos-hardware/lenovo/thinkpad/e470/default.nix b/modules/nixos-hardware/lenovo/thinkpad/e470/default.nix
new file mode 100644
index 000000000000..c9bf8331b050
--- /dev/null
+++ b/modules/nixos-hardware/lenovo/thinkpad/e470/default.nix
@@ -0,0 +1,19 @@
+{ config, lib, pkgs, ... }:
+
+{
+  imports = [
+    ../.
+    ../../../common/cpu/intel/kaby-lake
+    ../../../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";
+  };
+
+  boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.6") pkgs.linuxPackages_latest;
+}