From ce38b7abb108091a6ba6bb356b38339463aaba20 Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Tue, 1 Feb 2022 14:16:50 +0100 Subject: [PATCH] added thinkpad t14 gen2 and copied t14s files where applicable --- lenovo/thinkpad/t14 | 1 - lenovo/thinkpad/t14/amd/default.nix | 12 ++++++++++++ lenovo/thinkpad/t14/amd/gen2/default.nix | 11 +++++++++++ lenovo/thinkpad/t14/default.nix | 20 ++++++++++++++++++++ 4 files changed, 43 insertions(+), 1 deletion(-) delete mode 120000 lenovo/thinkpad/t14 create mode 100644 lenovo/thinkpad/t14/amd/default.nix create mode 100644 lenovo/thinkpad/t14/amd/gen2/default.nix create mode 100644 lenovo/thinkpad/t14/default.nix diff --git a/lenovo/thinkpad/t14 b/lenovo/thinkpad/t14 deleted file mode 120000 index 7be5dd8..0000000 --- a/lenovo/thinkpad/t14 +++ /dev/null @@ -1 +0,0 @@ -t14s/ \ No newline at end of file diff --git a/lenovo/thinkpad/t14/amd/default.nix b/lenovo/thinkpad/t14/amd/default.nix new file mode 100644 index 0000000..fbd9f20 --- /dev/null +++ b/lenovo/thinkpad/t14/amd/default.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../../common/cpu/amd + ../../../../common/gpu/amd + ]; + + # For support of newer AMD GPUs, backlight and internal microphone + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.8") pkgs.linuxPackages_latest; +} diff --git a/lenovo/thinkpad/t14/amd/gen2/default.nix b/lenovo/thinkpad/t14/amd/gen2/default.nix new file mode 100644 index 0000000..653ca92 --- /dev/null +++ b/lenovo/thinkpad/t14/amd/gen2/default.nix @@ -0,0 +1,11 @@ + +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ]; + + # For support of MEDIATEK Corp. Device 7961 wireless network controller, see https://lwn.net/Articles/843303/ + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") pkgs.linuxPackages_latest; +} diff --git a/lenovo/thinkpad/t14/default.nix b/lenovo/thinkpad/t14/default.nix new file mode 100644 index 0000000..d783b21 --- /dev/null +++ b/lenovo/thinkpad/t14/default.nix @@ -0,0 +1,20 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ../../../common/pc/laptop/acpi_call.nix + ]; + + # For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI. + # See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Suspend_issues + + # Fingerprint sensor requires a firmware-update to work. + + # Force use of the thinkpad_acpi driver for backlight control. + # This allows the backlight save/load systemd service to work. + boot.kernelParams = [ "acpi_backlight=native" ]; + + # see https://github.com/NixOS/nixpkgs/issues/69289 + boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.2") pkgs.linuxPackages_latest; +}