chore: format repo using treefmt-nix and nixfmt-rfc-style

This commit is contained in:
Andre
2025-06-04 12:11:03 -04:00
parent fc7c471412
commit 51e51e6014
266 changed files with 3721 additions and 2733 deletions

View File

@@ -1,14 +1,24 @@
{ config,
{
config,
pkgs,
lib,
...
}:
let
inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder;
inherit (lib)
mkDefault
mkEnableOption
mkIf
mkMerge
version
versionAtLeast
versionOlder
;
cfg = config.hardware.asus.zephyrus.ga402x;
in {
in
{
imports = [
../../../common/cpu/amd
@@ -26,12 +36,12 @@ in {
# enables it for kernel 6.9.x onwards.
#
# Note: the device name is "ASUS N-KEY Device".
keyboard.autosuspend.enable = (
mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X"
) // {
default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9";
defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\"";
};
keyboard.autosuspend.enable =
(mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X")
// {
default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9";
defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\"";
};
# The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop.
# After the first successful hibernate, it will work as expected, however.
# NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up.
@@ -67,7 +77,7 @@ in {
};
}
(mkIf (! cfg.keyboard.autosuspend.enable) {
(mkIf (!cfg.keyboard.autosuspend.enable) {
services.udev.extraRules = ''
# Disable power auto-suspend for the ASUS N-KEY device, i.e. USB Keyboard.
# Otherwise on certain kernel-versions, it will tend to take 1-2 key-presses to wake-up after the device suspends.
@@ -75,7 +85,7 @@ in {
'';
})
(mkIf (! cfg.ite-device.wakeup.enable) {
(mkIf (!cfg.ite-device.wakeup.enable) {
services.udev.extraRules = ''
# Disable power wakeup for the 8295 ITE device.
# Otherwise on certain kernel-versions, it will tend to cause the laptop to immediately wake-up when suspending.