dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
modules/hosts/valkyrie/_asus/default.nix (1421B)
1_: {
2 nixos = {
3 config,
4 lib,
5 ...
6 }: let
7 perf = config.hardware.cpu.mode == "performance";
8 in {
9 boot = {
10 plymouth.extraConfig = "DeviceScale=2";
11
12 # ! # https://gitlab.freedesktop.org/drm/amd/-/issues/3388
13 kernelParams = lib.mkIf perf [
14 "amdgpu.dcdebugmask=0x10"
15 "usbcore.autosuspend=-1"
16 ];
17 };
18
19 environment.sessionVariables.AQ_DRM_DEVICES =
20 lib.mkIf (config.hardware.gpu.enable && perf)
21 "/dev/dri/nvidia-dgpu:/dev/dri/integrated-gpu";
22
23 services = {
24 fwupd.enable = true;
25
26 # Remap Keys
27 udev.extraHwdb = ''
28 evdev:name:ASUSTek Computer Inc. N-KEY Device:*
29 KEYBOARD_KEY_7003f=sysrq # F6 -> PrtSc Key
30 '';
31
32 # ASUS Software
33 asusd = {
34 enable = true;
35 asusdConfig.text = builtins.readFile ./asusd.ron;
36 auraConfigs."19b6".text = builtins.readFile ./aura.ron;
37 fanCurvesConfig.text = builtins.readFile ./fan_curves.ron;
38 };
39 };
40 };
41
42 home = {lib, ...}: {
43 home.persist.directories = [".config/rog"];
44
45 # Keybinds
46 wayland.windowManager.hyprland.settings.bind = let
47 inline = lib.generators.mkLuaInline;
48 locked = {locked = true;};
49 in [
50 {_args = ["XF86Launch3" (inline ''hl.dsp.exec_cmd("asusctl aura -n")'') locked];}
51 {_args = ["XF86Launch4" (inline ''hl.dsp.exec_cmd("asusctl profile -n")'') locked];}
52 ];
53 };
54}