1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-08 20:19:40 +01:00
nixos-hardware/lenovo/yoga/7/slim/gen8/default.nix
2024-01-15 09:51:25 +00:00

20 lines
830 B
Nix

{ pkgs, lib, ... }: {
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" ];
# https://gitlab.freedesktop.org/drm/amd/-/issues/2812#note_2190544
boot.kernelParams = ["mem_sleep_default=deep" "rtc_cmos.use_acpi_alarm=1"];
# suspend needs kernel 6.7 or later
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "6.7") pkgs.linuxPackages_latest;
# https://gitlab.freedesktop.org/drm/amd/-/issues/2812#note_2190544
hardware.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
boot.initrd.prepend = lib.mkOrder 0 [ "${pkgs.fetchurl {
url = "https://gitlab.freedesktop.org/drm/amd/uploads/9fe228c7aa403b78c61fb1e29b3b35e3/slim7-ssdt";
sha256 = "sha256-Ef4QTxdjt33OJEPLAPEChvvSIXx3Wd/10RGvLfG5JUs=";
name = "slim7-ssdt";
}}" ];
}