mirror of
https://github.com/NixOS/nixos-hardware.git
synced 2025-11-04 01:07:14 +08:00
Add lenovo-thinkpad-p1 (#266)
Co-authored-by: Jörg Thalheim <Mic92@users.noreply.github.com>
This commit is contained in:
7
lenovo/thinkpad/p1/3th-gen/audio.nix
Normal file
7
lenovo/thinkpad/p1/3th-gen/audio.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
# This can be removed when the default kernel is at least version 5.11 due to sof module
|
||||
boot.kernelPackages = lib.mkIf
|
||||
(lib.versionOlder pkgs.linux.version "5.11")
|
||||
(lib.mkDefault pkgs.linuxPackages_latest);
|
||||
}
|
||||
7
lenovo/thinkpad/p1/3th-gen/default.nix
Normal file
7
lenovo/thinkpad/p1/3th-gen/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
imports = [
|
||||
../.
|
||||
./audio.nix
|
||||
./nvidia.nix
|
||||
];
|
||||
}
|
||||
13
lenovo/thinkpad/p1/3th-gen/nvidia.nix
Normal file
13
lenovo/thinkpad/p1/3th-gen/nvidia.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
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";
|
||||
};
|
||||
}
|
||||
17
lenovo/thinkpad/p1/default.nix
Normal file
17
lenovo/thinkpad/p1/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
imports = [
|
||||
../../../common/cpu/intel
|
||||
../../../common/gpu/nvidia.nix
|
||||
../../../common/pc/laptop/acpi_call.nix
|
||||
../../../common/pc/laptop/ssd
|
||||
];
|
||||
|
||||
# Need to set Thunderbolt to "BIOS Assist Mode"
|
||||
# https://forums.lenovo.com/t5/Other-Linux-Discussions/T480-CPU-temperature-and-fan-speed-under-linux/m-p/4114832
|
||||
boot.kernelParams = [ "acpi_backlight=native" ];
|
||||
|
||||
# Emulate mouse wheel on trackpoint
|
||||
# hardware.trackpoint.emulateWheel = true;
|
||||
|
||||
services.fprintd.enable = true;
|
||||
}
|
||||
Reference in New Issue
Block a user