Add asusctl settings

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2025-05-25 21:18:28 +01:00
parent 62671b894c
commit b631d466ff
18 changed files with 71 additions and 35 deletions

View File

@@ -74,14 +74,25 @@
xserver.videoDrivers = [ "nvidia" ];
fstrim.enable = true;
tlp.settings.DISK_DEVICES = lib.mkDefault "nvme0n1 nvme1n1";
logind.lidSwitch = "ignore";
asusd = {
enable = true;
enableUserService = true;
# FIXME: https://gitlab.com/asus-linux/asusctl/-/issues/532
# enableUserService = true;
asusdConfig.source = ./asusd.ron;
};
supergfxd = {
enable = true;
settings = {
vfio_enable = true;
no_logind = true;
};
};
supergfxd.enable = true;
};
environment.persistence."/persist"."/etc/asusd/aura_19b6.ron" = { };
programs.gamescope.env = {
__NV_PRIME_RENDER_OFFLOAD = "1";
__VK_LAYER_NV_optimus = "NVIDIA_only";
@@ -93,6 +104,23 @@
wayland.windowManager.hyprland.settings.env = [
"AQ_DRM_DEVICES,/dev/dri/card0:/dev/dri/card1"
];
theme = {
template.".config/asusctl/keyboard".source =
pkgs.writeText ".config/asusctl/keyboard" "{{colors.primary_container.default.hex_stripped}}";
initExtraConfig = "${
lib.meta.getExe (
pkgs.writeShellApplication {
name = "theme-asusctl";
runtimeInputs = with pkgs; [ asusctl ];
text = ''
asusctl aura static -c "$(<"$HOME/.config/asusctl/keyboard")"
'';
}
)
} &";
};
}
];
}