From 39eac9bf9a5553ba0815f5824309fa00f9573820 Mon Sep 17 00:00:00 2001 From: SnIcK Date: Tue, 11 Jul 2023 02:20:24 -0500 Subject: [PATCH] added 16IRX8H Lenovo Legion 7i Pro (2023) (#660) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * added 16IRX8H Lenovo Legion 7i Pro (2023) Co-authored-by: Jörg Thalheim --- README.md | 1 + flake.nix | 1 + lenovo/legion/16irx8h/default.nix | 35 +++++++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 lenovo/legion/16irx8h/default.nix diff --git a/README.md b/README.md index 71911b3..1a72c79 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ See code for all available configurations. | [Lenovo Legion 5 Pro 16ach6h](lenovo/legion/16ach6h) | `` | | [Lenovo Legion 5 Pro 16ach6h (Hybrid)](lenovo/legion/16ach6h/hybrid)| `` | | [Lenovo Legion 5 Pro 16ach6h (Nvidia)](lenovo/legion/16ach6h/nvidia)| `` | +| [Lenovo Legion 7i Pro 16irx8h (Intel)](lenovo/legion/16irx8h) | `` | | [Lenovo Legion Y530 15ICH](lenovo/legion/15ich) | `` | | [Lenovo ThinkPad E14 (AMD)](lenovo/thinkpad/e14/amd) | `` | | [Lenovo ThinkPad E14 (Intel)](lenovo/thinkpad/e14/intel) | `` | diff --git a/flake.nix b/flake.nix index 505c0a7..ea302bb 100644 --- a/flake.nix +++ b/flake.nix @@ -77,6 +77,7 @@ lenovo-legion-16ach6h-hybrid = import ./lenovo/legion/16ach6h/hybrid; lenovo-legion-16ach6h-nvidia = import ./lenovo/legion/16ach6h/nvidia; lenovo-legion-16ithg6 = import ./lenovo/legion/16ithg6; + lenovo-legion-16irx8h = import ./lenovo/legion/16irx8h; lenovo-legion-y530-15ich = import ./lenovo/legion/15ich; lenovo-thinkpad = import ./lenovo/thinkpad; lenovo-thinkpad-e14-amd = import ./lenovo/thinkpad/e14/amd; diff --git a/lenovo/legion/16irx8h/default.nix b/lenovo/legion/16irx8h/default.nix new file mode 100644 index 0000000..7249c1d --- /dev/null +++ b/lenovo/legion/16irx8h/default.nix @@ -0,0 +1,35 @@ +{ + lib, + config, + pkgs, + ... +}: { + imports = [ + ../../../common/cpu/intel + ../../../common/gpu/nvidia/prime.nix + ../../../common/pc/laptop + ../../../common/pc/laptop/ssd + ../../../common/hidpi.nix + ]; + + boot.initrd.kernelModules = ["nvidia"]; + boot.extraModulePackages = [config.boot.kernelPackages.lenovo-legion-module config.boot.kernelPackages.nvidia_x11]; + + hardware = { + nvidia = { + modesetting.enable = lib.mkDefault true; + powerManagement.enable = lib.mkDefault true; + # + prime = { + intelBusId = "PCI:00:02:0"; + nvidiaBusId = "PCI:01:00:0"; + }; + }; + }; + + # Cooling management + services.thermald.enable = lib.mkDefault true; + + # √(2560² + 1600²) px / 16 in ≃ 189 dpi + services.xserver.dpi = 189; +}