2023-10-09 12:53:23 +02:00
|
|
|
{
|
2023-10-09 15:42:46 +02:00
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2023-10-09 13:13:41 +02:00
|
|
|
imports = [
|
|
|
|
../../../../common/cpu/amd
|
|
|
|
../../../../common/gpu/amd
|
|
|
|
../../../../common/pc/laptop/ssd
|
|
|
|
];
|
2023-10-09 15:42:46 +02:00
|
|
|
|
2023-10-09 16:39:59 +02:00
|
|
|
hardware.amdgpu.loadInInitrd = lib.mkDefault false;
|
|
|
|
|
2023-10-09 19:06:50 +02:00
|
|
|
services.udev.extraRules = builtins.concatStringsSep "\n" (
|
2023-10-09 15:42:46 +02:00
|
|
|
["# Properly suspend the system."]
|
|
|
|
++ (
|
|
|
|
map
|
|
|
|
(device: "SUBSYSTEM==\"pci\", ACTION==\"add\", ATTR{vendor}==\"0x144d\", ATTR{device}==\"${device}\", RUN+=\"${pkgs.bash}/bin/sh -c '${pkgs.coreutils}/bin/echo 0 | ${pkgs.coreutils}/bin/tee /sys/bus/pci/devices/$kernel/d3cold_allowed'\"")
|
|
|
|
["0xa80a" "0xa808"]
|
|
|
|
)
|
|
|
|
);
|
2023-10-09 12:53:23 +02:00
|
|
|
}
|