2022-12-31 10:52:38 +00:00
|
|
|
{ pkgs, lib, ... }:
|
2021-11-18 23:01:56 +00:00
|
|
|
{
|
|
|
|
imports = [
|
2022-07-30 16:21:18 +00:00
|
|
|
../../../common/cpu/amd/pstate.nix
|
2022-11-13 01:54:59 +00:00
|
|
|
../../../common/gpu/nvidia/prime.nix
|
2021-11-18 23:01:56 +00:00
|
|
|
../../../common/pc/laptop
|
|
|
|
../../../common/pc/ssd
|
|
|
|
../../battery.nix
|
|
|
|
];
|
|
|
|
|
|
|
|
# fixing audio by overriding pins as suggested in
|
|
|
|
# https://www.reddit.com/r/ASUS/comments/mfokva/asus_strix_scar_17_g733qs_and_linux/
|
|
|
|
hardware.firmware = [
|
|
|
|
(pkgs.runCommand "jack-retask" { } ''
|
|
|
|
install -D ${./hda-jack-retask.fw} $out/lib/firmware/hda-jack-retask.fw
|
|
|
|
'')
|
|
|
|
];
|
|
|
|
boot.extraModprobeConfig = ''
|
|
|
|
options snd-hda-intel patch=hda-jack-retask.fw
|
|
|
|
'';
|
|
|
|
# before 5.12 it would interpret every keystroke as the power button
|
2021-11-24 20:49:28 +00:00
|
|
|
boot.kernelPackages = lib.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest);
|
2021-11-18 23:01:56 +00:00
|
|
|
|
|
|
|
hardware.nvidia.prime = {
|
|
|
|
amdgpuBusId = "PCI:5:0:0";
|
|
|
|
nvidiaBusId = "PCI:1:0:1";
|
|
|
|
};
|
|
|
|
}
|