nixos/libinput: move out of xserver

This commit is contained in:
Sandro Jäckel 2024-04-17 22:55:18 +02:00
parent 3814255973
commit 810558a46b
No known key found for this signature in database
GPG key ID: 3AF5A43A3EECC2E5
2 changed files with 9 additions and 5 deletions

View file

@ -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

View file

@ -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";