-
-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #337 from pasqui23/strix
Added ROG Strix G733QS
- Loading branch information
Showing
5 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ config, pkgs, lib, ... }: | ||
let | ||
p = pkgs.writeScriptBin "charge-upto" '' | ||
echo ''${0:-100} > /sys/class/power_supply/BAT0/charge_control_end_threshold | ||
''; | ||
cfg = config.hardware.asus; | ||
in | ||
|
||
{ | ||
options.hardware.asus.battery.chargeUpto = lib.mkOption { | ||
description = "Maximum level of charge for your battery, as a percentage."; | ||
default = 100; | ||
type = lib.types.int; | ||
}; | ||
config = { | ||
environment.systemPackages = [ p ]; | ||
systemd.tmpfiles.rules = [ | ||
"w /sys/class/power_supply/BAT0/charge_control_end_threshold - - - - ${toString cfg.battery.chargeUpto}" | ||
]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ 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.mkIf (lib.versionOlder pkgs.linux.version "5.12") (lib.mkDefault pkgs.linuxPackages_latest); | ||
|
||
hardware.nvidia.prime = { | ||
offload.enable = lib.mkDefault true; | ||
amdgpuBusId = "PCI:5:0:0"; | ||
nvidiaBusId = "PCI:1:0:1"; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[codec] | ||
0x10ec0285 0x10431e6e 0 | ||
|
||
[pincfg] | ||
0x12 0x90a60140 | ||
0x13 0x40000000 | ||
0x14 0x90170152 | ||
0x16 0x411111f0 | ||
0x17 0x90170110 | ||
0x18 0x411111f0 | ||
0x19 0x03a19020 | ||
0x1a 0x411111f0 | ||
0x1b 0x411111f0 | ||
0x1d 0x40663a45 | ||
0x1e 0x90170151 | ||
0x21 0x03211020 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters