From ce38b7abb108091a6ba6bb356b38339463aaba20 Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Tue, 1 Feb 2022 14:16:50 +0100 Subject: [PATCH 1/4] 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; +} From 2e4ee9d5e88e733ab5d3fb55ca1d004215266fa3 Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Wed, 2 Feb 2022 10:54:59 +0100 Subject: [PATCH 2/4] removed empty newline --- lenovo/thinkpad/t14/amd/gen2/default.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lenovo/thinkpad/t14/amd/gen2/default.nix b/lenovo/thinkpad/t14/amd/gen2/default.nix index 653ca92..367e398 100644 --- a/lenovo/thinkpad/t14/amd/gen2/default.nix +++ b/lenovo/thinkpad/t14/amd/gen2/default.nix @@ -1,4 +1,3 @@ - { config, lib, pkgs, ... }: { From 6e9617a7333bcb0466bbc270576653cf22d8bb9a Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Fri, 4 Feb 2022 15:10:46 +0100 Subject: [PATCH 3/4] readded t14 amd gen1 to new folder structure --- README.md | 5 +++-- lenovo/thinkpad/t14/amd/gen1/default.nix | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 lenovo/thinkpad/t14/amd/gen1/default.nix diff --git a/README.md b/README.md index d913362..5728c16 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ See code for all available configurations. | [Apple MacBook Pro 12,1](apple/macbook-pro/12-1) | `` | | [Apple MacBook Pro 10,1](apple/macbook-pro/10-1) | `` | | [Asus TUF FX504GD](asus/fx504gd) | `` | -| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | +| [Asus ROG Strix G733QS](asus/rog-strix/g733qs) | `` | | [Asus ROG Zephyrus G14 GA401](asus/zephyrus/ga401) | `` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `` | | [Dell G3 3779](dell/g3/3779) | `` | @@ -120,7 +120,8 @@ See code for all available configurations. | [Lenovo ThinkPad P53](lenovo/thinkpad/p53) | `` | | [Lenovo ThinkPad T14](lenovo/thinkpad/t14) | `` | | [Lenovo ThinkPad T14s](lenovo/thinkpad/t14s) | `` | -| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | +| [Lenovo ThinkPad T14 AMD Gen 1](lenovo/thinkpad/t14/amd/gen1) | `` | +| [Lenovo ThinkPad T14 AMD Gen 2](lenovo/thinkpad/t14/amd/gen2) | `` | | [Lenovo ThinkPad T14s AMD Gen 1](lenovo/thinkpad/t14s/amd/gen1) | `` | | [Lenovo ThinkPad T410](lenovo/thinkpad/t410) | `` | | [Lenovo ThinkPad T420](lenovo/thinkpad/t420) | `` | diff --git a/lenovo/thinkpad/t14/amd/gen1/default.nix b/lenovo/thinkpad/t14/amd/gen1/default.nix new file mode 100644 index 0000000..cb1ec7d --- /dev/null +++ b/lenovo/thinkpad/t14/amd/gen1/default.nix @@ -0,0 +1,8 @@ + +{ config, lib, pkgs, ... }: + +{ + imports = [ + ../. + ]; +} From 1c5bade89567f0bbad4aa9ff80606c3d0ca52b98 Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Tue, 8 Feb 2022 08:56:25 +0100 Subject: [PATCH 4/4] updated flake.nix to include t14 amd gen2 --- flake.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/flake.nix b/flake.nix index 593513c..ecc4695 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,7 @@ lenovo-thinkpad-p53 = import ./lenovo/thinkpad/p53; lenovo-thinkpad-t14 = import ./lenovo/thinkpad/t14; lenovo-thinkpad-t14-amd-gen1 = import ./lenovo/thinkpad/t14/amd/gen1; + lenovo-thinkpad-t14-amd-gen2 = import ./lenovo/thinkpad/t14/amd/gen2; lenovo-thinkpad-t14s = import ./lenovo/thinkpad/t14s; lenovo-thinkpad-t14s-amd-gen1 = import ./lenovo/thinkpad/t14s/amd/gen1; lenovo-thinkpad-t410 = import ./lenovo/thinkpad/t410;