add config for ASUS TUF FX506HM

This commit is contained in:
Andy3153 2024-05-20 00:55:37 +03:00 committed by mergify[bot]
parent 888d915fe8
commit d946893c3b
4 changed files with 54 additions and 0 deletions

View file

@ -94,6 +94,7 @@ See code for all available configurations.
| [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `<nixos-hardware/asus/zephyrus/ga503>` | | [Asus ROG Zephyrus G15 GA503](asus/zephyrus/ga503) | `<nixos-hardware/asus/zephyrus/ga503>` |
| [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `<nixos-hardware/asus/zephyrus/gu603h>` | | [Asus ROG Zephyrus M16 GU603H](asus/zephyrus/gu603h) | `<nixos-hardware/asus/zephyrus/gu603h>` |
| [Asus TUF FX504GD](asus/fx504gd) | `<nixos-hardware/asus/fx504gd>` | | [Asus TUF FX504GD](asus/fx504gd) | `<nixos-hardware/asus/fx504gd>` |
| [Asus TUF FX506HM](asus/fx506hm) | `<nixos-hardware/asus/fx506hm>` |
| [Asus TUF FA507RM](asus/fa507rm) | `<nixos-hardware/asus/fa507rm>` | | [Asus TUF FA507RM](asus/fa507rm) | `<nixos-hardware/asus/fa507rm>` |
| [Asus TUF FA507NV](asus/fa507nv) | `<nixos-hardware/asus/fa507nv>` | | [Asus TUF FA507NV](asus/fa507nv) | `<nixos-hardware/asus/fa507nv>` |
| [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `<nixos-hardware/beagleboard/pocketbeagle>` | | [BeagleBoard PocketBeagle](beagleboard/pocketbeagle) | `<nixos-hardware/beagleboard/pocketbeagle>` |

28
asus/fx506hm/README.md Normal file
View file

@ -0,0 +1,28 @@
<!-- vim: set fenc=utf-8 ts=2 sw=2 sts=-1 sr et si tw=0 fdm=marker fmr={{{,}}}: -->
# [ASUS TUF Gaming F15 FX506HM (2021)](https://www.asus.com/laptops/for-gaming/tuf-gaming/2021-asus-tuf-gaming-f15/)
This imports common modules for the Intel CPU and iGPU, Nvidia and PRIME render offloading, basic laptop configs, basic SSD configs and configs for ASUS batteries.
On top of that, it sets the right PCI bus IDs for the iGPU and dGPU to make PRIME work well and enables modesetting.
## Useful other things to consider in your configuration
### Battery charging limit
Due to the common module for ASUS batteries, you can make your battery only charge up to a certain percentage to improve its life. You can place something similar to the following in your configuration to enable it:
```nix
hardware.asus.battery =
{
chargeUpto = 85; # Maximum level of charge for your battery, as a percentage.
enableChargeUptoScript = true; # Whether to add charge-upto to environment.systemPackages. `charge-upto 85` temporarily sets the charge limit to 85%.
};
```
### OpenRGB
You can use OpenRGB to control the RGB keyboard on this laptop. There's also plugins for it to get some extra RGB lighting modes if you wish. You can place the following in your configuration to enable it:
```nix
boot.kernelModules = [ "i2c-dev" ];
hardware.i2c.enable = true;
services.udev.packages = [ pkgs.openrgb ];
services.hardware.openrgb.enable = true;
```

24
asus/fx506hm/default.nix Normal file
View file

@ -0,0 +1,24 @@
{ lib, ... }:
{
imports =
[
../../common/cpu/intel
../../common/gpu/nvidia
../../common/gpu/nvidia/prime.nix
../../common/pc/laptop
../../common/pc/ssd
../battery.nix
]
hardware.nvidia =
{
modesetting.enable = lib.mkDefault true;
prime =
{
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
};
}

View file

@ -18,6 +18,7 @@
asus-battery = import ./asus/battery.nix; asus-battery = import ./asus/battery.nix;
asus-ally-rc71l = import ./asus/ally/rc71l; asus-ally-rc71l = import ./asus/ally/rc71l;
asus-fx504gd = import ./asus/fx504gd; asus-fx504gd = import ./asus/fx504gd;
asus-fx506hm = import ./asus/fx506hm;
asus-fa507nv = import ./asus/fa507nv; asus-fa507nv = import ./asus/fa507nv;
asus-fa507rm = import ./asus/fa507rm; asus-fa507rm = import ./asus/fa507rm;
asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace; asus-pro-ws-x570-ace = import ./asus/pro-ws-x570-ace;