nixos-hardware/asus/rog-strix/g733qs/default.nix
2021-11-20 22:03:09 +01:00

30 lines
852 B
Nix

{ config, pkgs, lib, ... }:
{
imports = [
../../../common/cpu/amd
../../../common/gpu/nvidia.nix
../../../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
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
hardware.nvidia.prime = {
offload.enable = lib.mkDefault true;
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:1";
};
}