From 810558a46bff49a214454c60039dff9e195e629a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Wed, 17 Apr 2024 22:55:18 +0200 Subject: [PATCH] nixos/libinput: move out of xserver --- nixos/modules/module-list.nix | 2 +- .../modules/services/{x11 => }/hardware/libinput.nix | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) rename nixos/modules/services/{x11 => }/hardware/libinput.nix (95%) diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 5ea9121b7f44..913774f8381a 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -558,6 +558,7 @@ ./services/hardware/joycond.nix ./services/hardware/kanata.nix ./services/hardware/lcd.nix + ./services/hardware/libinput.nix ./services/hardware/lirc.nix ./services/hardware/nvidia-container-toolkit-cdi-generator ./services/hardware/monado.nix @@ -1466,7 +1467,6 @@ ./services/x11/gdk-pixbuf.nix ./services/x11/hardware/cmt.nix ./services/x11/hardware/digimend.nix - ./services/x11/hardware/libinput.nix ./services/x11/hardware/synaptics.nix ./services/x11/hardware/wacom.nix ./services/x11/imwheel.nix diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/hardware/libinput.nix similarity index 95% rename from nixos/modules/services/x11/hardware/libinput.nix rename to nixos/modules/services/hardware/libinput.nix index 54ff7d85a033..b8aa59035d33 100644 --- a/nixos/modules/services/x11/hardware/libinput.nix +++ b/nixos/modules/services/hardware/libinput.nix @@ -2,7 +2,7 @@ with lib; -let cfg = config.services.xserver.libinput; +let cfg = config.services.libinput; xorgBool = v: if v then "on" else "off"; @@ -223,7 +223,7 @@ let cfg = config.services.xserver.libinput; in { imports = - (map (option: mkRenamedOptionModule ([ "services" "xserver" "libinput" option ]) [ "services" "xserver" "libinput" "touchpad" option ]) [ + (map (option: mkRenamedOptionModule ([ "services" "xserver" "libinput" option ]) [ "services" "libinput" "touchpad" option ]) [ "accelProfile" "accelSpeed" "buttonMapping" @@ -242,11 +242,15 @@ in { "transformationMatrix" "disableWhileTyping" "additionalOptions" - ]); + ]) ++ [ + (mkRenamedOptionModule [ "services" "xserver" "libinput" "enable" ] [ "services" "libinput" "enable" ]) + (mkRenamedOptionModule [ "services" "xserver" "libinput" "mouse" ] [ "services" "libinput" "mouse" ]) + (mkRenamedOptionModule [ "services" "xserver" "libinput" "touchpad" ] [ "services" "libinput" "touchpad" ]) + ]; options = { - services.xserver.libinput = { + services.libinput = { enable = mkEnableOption "libinput" // { default = config.services.xserver.enable; defaultText = lib.literalExpression "config.services.xserver.enable";