Skip to content

Commit 6906ac6

Browse files
Merge pull request #1209 from NixOS/lib.literalExpression
Set missing lib.literalExpression
2 parents e8a2f6d + 59b6e11 commit 6906ac6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

asus/zephyrus/ga402x/shared.nix

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ let
88
inherit (lib) mkDefault mkEnableOption mkIf mkMerge version versionAtLeast versionOlder;
99

1010
cfg = config.hardware.asus.zephyrus.ga402x;
11-
defaultAutosuspendEnable = versionAtLeast config.boot.kernelPackages.kernel.version "6.9";
12-
1311
in {
1412

1513
imports = [
@@ -31,7 +29,10 @@ in {
3129
# Note: the device name is "ASUS N-KEY Device".
3230
keyboard.autosuspend.enable = (
3331
mkEnableOption "Enable auto-suspend on the internal USB keyboard (ASUS N-KEY Device) on Zephyrus GA402X"
34-
) // { default = defaultAutosuspendEnable; };
32+
) // {
33+
default = versionAtLeast config.boot.kernelPackages.kernel.version "6.9";
34+
defaultText = lib.literalExpression "lib.versionAtLeast config.boot.kernelPackages.kernel.version \"6.9\"";
35+
};
3536
# The ASUS 8295 ITE device will cause an immediate wake-up when trying to suspend the laptop.
3637
# After the first successful hibernate, it will work as expected, however.
3738
# NOTE: I'm not actually sure what this device, as neither the touchpad nor the M1-M4 keys cause a wake-up.

0 commit comments

Comments
 (0)