mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-27 12:09:45 +01:00
Initial config. for Lenovo Yoga Slim 7 Pro-X (14ARH7)
- Add entry to README.md and flake.nix
This commit is contained in:
parent
06e919ac07
commit
5a8ed531f9
3 changed files with 85 additions and 0 deletions
|
@ -231,6 +231,8 @@ See code for all available configurations.
|
|||
| [Lenovo ThinkPad Z Series](lenovo/thinkpad/z) | `<nixos-hardware/lenovo/thinkpad/z>` |
|
||||
| [Lenovo ThinkPad Z13](lenovo/thinkpad/z/z13) | `<nixos-hardware/lenovo/thinkpad/z/z13>` |
|
||||
| [LENOVO Yoga 6 13ALC6 82ND](lenovo/yoga/6/13ALC6) | `<nixos-hardware/lenovo/yoga/6/13ALC6>` |
|
||||
| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/amdgpu) | `<nixos-hardware/lenovo/yoga/7/14ARH7/amdgpu>` |
|
||||
| [LENOVO Yoga Slim 7 Pro-X 14ARH7 82ND](lenovo/yoga/7/14ARH7/nvidia) | `<nixos-hardware/lenovo/yoga/7/14ARH7/nvidia>` |
|
||||
| [LENOVO Yoga 7 Slim Gen8](lenovo/yoga/7/slim/gen8) | `<nixos-hardware/lenovo/yoga/7/slim/gen8>` |
|
||||
| [MSI GS60 2QE](msi/gs60) | `<nixos-hardware/msi/gs60>` |
|
||||
| [MSI GL62/CX62](msi/gl62) | `<nixos-hardware/msi/gl62>` |
|
||||
|
|
|
@ -170,6 +170,7 @@
|
|||
lenovo-thinkpad-z = import ./lenovo/thinkpad/z;
|
||||
lenovo-thinkpad-z13 = import ./lenovo/thinkpad/z/z13;
|
||||
lenovo-yoga-6-13ALC6 = import ./lenovo/yoga/6/13ALC6;
|
||||
lenovo-yoga-7-14ARH7 = import ./lenovo/yoga/7/14ARH7;
|
||||
lenovo-yoga-7-slim-gen8 = import ./lenovo/yoga/7/slim/gen8;
|
||||
letsnote-cf-lx4 = import ./panasonic/letsnote/cf-lx4;
|
||||
microchip-icicle-kit = import ./microchip/icicle-kit;
|
||||
|
|
82
lenovo/yoga/7/14ARH7/default.nix
Normal file
82
lenovo/yoga/7/14ARH7/default.nix
Normal file
|
@ -0,0 +1,82 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkDefault mkMerge;
|
||||
|
||||
in {
|
||||
imports = [
|
||||
../../../../common/cpu/amd
|
||||
# Better power-savings from AMD PState:
|
||||
../../../../common/cpu/amd/pstate.nix
|
||||
../../../../common/gpu/amd
|
||||
## "prime.nix" loads this, aleady:
|
||||
# ../../../../common/gpu/nvidia
|
||||
../../../../common/gpu/nvidia/prime.nix
|
||||
../../../../common/pc/laptop
|
||||
../../../../common/pc/laptop/acpi_call.nix
|
||||
../../../../common/pc/ssd
|
||||
];
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
# Configure basic system settings:
|
||||
boot = {
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
kernelParams = [
|
||||
"mem_sleep_default=deep"
|
||||
"pcie_aspm.policy=powersupersave"
|
||||
|
||||
## Supposed to help fix for suspend issues: SSD not correctly working, and Keyboard not responding:
|
||||
## Not needed for the 6.1+ kernels?
|
||||
# "iommu=pt"
|
||||
|
||||
## Fixes for s2idle:
|
||||
## https://www.phoronix.com/news/More-s2idle-Rembrandt-Linux
|
||||
# "acpi.prefer_microsoft_guid=1"
|
||||
## Appears to have been renamed?
|
||||
"acpi.prefer_microsoft_dsm_guid=1"
|
||||
];
|
||||
|
||||
blacklistedKernelModules = [ "nouveau" ];
|
||||
};
|
||||
}
|
||||
|
||||
{
|
||||
## Graphics settings
|
||||
|
||||
## AMD RX680
|
||||
# services.xserver.videoDrivers = mkDefault [ "amdgpu" ];
|
||||
|
||||
# NVIDIA GeForce RTX 3050 Mobile (Ampere)
|
||||
services.xserver.videoDrivers = mkDefault [ "nvidia" ];
|
||||
|
||||
hardware = {
|
||||
## Enable the Nvidia card, as well as Prime and Offload:
|
||||
amdgpu.loadInInitrd = true;
|
||||
opengl.extraPackages = with pkgs; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = true;
|
||||
|
||||
prime = {
|
||||
offload = {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
amdgpuBusId = "PCI:4:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
|
||||
powerManagement = {
|
||||
enable = true;
|
||||
# finegrained = true
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in a new issue