Skip to content

Commit bca0b9f

Browse files
committed
feat: add Lenovo ThinkPad P16s Intel Gen 2
@moduon MT-9339
1 parent e1f1215 commit bca0b9f

File tree

6 files changed

+48
-0
lines changed

6 files changed

+48
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ See code for all available configurations.
247247
| [Lenovo ThinkPad P14s Intel Gen 3](lenovo/thinkpad/p14s/intel/gen3) | `<nixos-hardware/lenovo/thinkpad/p14s/intel/gen3>` |
248248
| [Lenovo ThinkPad P16s AMD Gen 1](lenovo/thinkpad/p16s/amd/gen1) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen1>` |
249249
| [Lenovo ThinkPad P16s AMD Gen 2](lenovo/thinkpad/p16s/amd/gen2) | `<nixos-hardware/lenovo/thinkpad/p16s/amd/gen2>` |
250+
| [Lenovo ThinkPad P16s Intel Gen 2](lenovo/thinkpad/p16s/intel/gen2) | `<nixos-hardware/lenovo/thinkpad/p16s/intel/gen2>` |
250251
| [Lenovo ThinkPad P1](lenovo/thinkpad/p1) | `<nixos-hardware/lenovo/thinkpad/p1>` |
251252
| [Lenovo ThinkPad P50](lenovo/thinkpad/p50) | `<nixos-hardware/lenovo/thinkpad/p50>` |
252253
| [Lenovo ThinkPad P51](lenovo/thinkpad/p51) | `<nixos-hardware/lenovo/thinkpad/p51>` |
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
imports = [
3+
../.
4+
];
5+
}
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
imports = [
3+
../.
4+
];
5+
}

flake.nix

+1
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
lenovo-thinkpad-p14s-intel-gen3 = import ./lenovo/thinkpad/p14s/intel/gen3;
192192
lenovo-thinkpad-p16s-amd-gen1 = import ./lenovo/thinkpad/p16s/amd/gen1;
193193
lenovo-thinkpad-p16s-amd-gen2 = import ./lenovo/thinkpad/p16s/amd/gen2;
194+
lenovo-thinkpad-p16s-intel-gen2 = import ./lenovo/thinkpad/p16s/intel/gen2;
194195
lenovo-thinkpad-p50 = import ./lenovo/thinkpad/p50;
195196
lenovo-thinkpad-p51 = import ./lenovo/thinkpad/p51;
196197
lenovo-thinkpad-p52 = import ./lenovo/thinkpad/p52;
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{modulesPath, lib, ...}: {
2+
imports = [
3+
(modulesPath + "/installer/scan/not-detected.nix")
4+
../.
5+
];
6+
7+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{lib, ...}: {
2+
imports = [
3+
../.
4+
../../../../common/cpu/intel/raptor-lake
5+
../../../../common/gpu/intel/raptor-lake
6+
../../../../common/gpu/nvidia/ampere
7+
../../../../common/gpu/nvidia/prime.nix
8+
];
9+
10+
boot.initrd.availableKernelModules = [
11+
"nvme"
12+
"sd_mod"
13+
"thunderbolt"
14+
"usb_storage"
15+
"usbhid"
16+
"xhci_pci"
17+
];
18+
boot.kernelModules = ["kvm-intel"];
19+
20+
# DOCS https://wiki.nixos.org/wiki/NVIDIA#Offload_mode
21+
hardware.nvidia.prime = {
22+
intelBusId = lib.mkDefault "PCI:0:2:0";
23+
nvidiaBusId = lib.mkDefault "PCI:3:0:0";
24+
};
25+
26+
# HACK https://github.com/NVIDIA/open-gpu-kernel-modules/issues/472
27+
hardware.nvidia.open = lib.mkOverride 993 false;
28+
}

0 commit comments

Comments
 (0)