summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2024-04-27 23:23:06 +0200
committerGitHub <noreply@github.com>2024-04-27 23:23:06 +0200
commit85808e4b33f65c7d418db493f18243db4285094c (patch)
treee5d74b84992109a7f3df824a3ab798bd55791065
parent3ed7049cddddc675ea43a2c8b1c925e69230aa43 (diff)
parentcb8b6a5d00464c268db7452e698ea6094649e9bd (diff)
Merge pull request #304902 from SuperSandro2000/libinput-xserver
nixos/libinput: move out of xserver
-rw-r--r--nixos/doc/manual/configuration/profiles/graphical.section.md2
-rw-r--r--nixos/doc/manual/configuration/x-windows.chapter.md4
-rw-r--r--nixos/modules/installer/tools/tools.nix2
-rw-r--r--nixos/modules/module-list.nix2
-rw-r--r--nixos/modules/profiles/graphical.nix6
-rw-r--r--nixos/modules/services/desktop-managers/plasma6.nix2
-rw-r--r--nixos/modules/services/display-managers/sddm.nix4
-rw-r--r--nixos/modules/services/hardware/libinput.nix (renamed from nixos/modules/services/x11/hardware/libinput.nix)12
-rw-r--r--nixos/modules/services/x11/desktop-managers/budgie.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/cinnamon.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/deepin.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/enlightenment.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/gnome.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/lxqt.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/mate.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/pantheon.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/plasma5.nix2
-rw-r--r--nixos/modules/services/x11/desktop-managers/xfce.nix2
-rw-r--r--nixos/modules/services/x11/hardware/cmt.nix4
-rw-r--r--nixos/modules/services/x11/hardware/synaptics.nix6
-rw-r--r--nixos/tests/libinput.nix2
21 files changed, 36 insertions, 30 deletions
diff --git a/nixos/doc/manual/configuration/profiles/graphical.section.md b/nixos/doc/manual/configuration/profiles/graphical.section.md
index 3bd80b52e845..84fad5c0a612 100644
--- a/nixos/doc/manual/configuration/profiles/graphical.section.md
+++ b/nixos/doc/manual/configuration/profiles/graphical.section.md
@@ -6,5 +6,5 @@ graphical installation CD.
It sets [](#opt-services.xserver.enable),
[](#opt-services.displayManager.sddm.enable),
[](#opt-services.xserver.desktopManager.plasma5.enable),
-and [](#opt-services.xserver.libinput.enable) to true. It also
+and [](#opt-services.libinput.enable) to true. It also
includes glxinfo and firefox in the system packages list.
diff --git a/nixos/doc/manual/configuration/x-windows.chapter.md b/nixos/doc/manual/configuration/x-windows.chapter.md
index c09e0877e866..31752330dd9a 100644
--- a/nixos/doc/manual/configuration/x-windows.chapter.md
+++ b/nixos/doc/manual/configuration/x-windows.chapter.md
@@ -207,7 +207,7 @@ Latitude series) can be enabled as follows:
```nix
{
- services.xserver.libinput.enable = true;
+ services.libinput.enable = true;
}
```
@@ -216,7 +216,7 @@ For instance, the following disables tap-to-click behavior:
```nix
{
- services.xserver.libinput.touchpad.tapping = false;
+ services.libinput.touchpad.tapping = false;
}
```
diff --git a/nixos/modules/installer/tools/tools.nix b/nixos/modules/installer/tools/tools.nix
index e7f9990e9632..7f16b97440c1 100644
--- a/nixos/modules/installer/tools/tools.nix
+++ b/nixos/modules/installer/tools/tools.nix
@@ -185,7 +185,7 @@ in
# };
# Enable touchpad support (enabled default in most desktopManager).
- # services.xserver.libinput.enable = true;
+ # services.libinput.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
# users.users.alice = {
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix
index 78107e33b9e9..ef25a7f3e75a 100644
--- a/nixos/modules/module-list.nix
+++ b/nixos/modules/module-list.nix
@@ -559,6 +559,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
./services/hardware/monado.nix
@@ -1473,7 +1474,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/profiles/graphical.nix b/nixos/modules/profiles/graphical.nix
index 8cc31652f807..72b865c584f0 100644
--- a/nixos/modules/profiles/graphical.nix
+++ b/nixos/modules/profiles/graphical.nix
@@ -7,10 +7,12 @@
services.xserver = {
enable = true;
desktopManager.plasma5.enable = true;
- libinput.enable = true; # for touchpad support on many laptops
};
- services.displayManager.sddm.enable = true;
+ services = {
+ displayManager.sddm.enable = true;
+ libinput.enable = true; # for touchpad support on many laptops
+ };
# Enable sound in virtualbox appliances.
hardware.pulseaudio.enable = true;
diff --git a/nixos/modules/services/desktop-managers/plasma6.nix b/nixos/modules/services/desktop-managers/plasma6.nix
index 856d36b8a303..08507b4d370a 100644
--- a/nixos/modules/services/desktop-managers/plasma6.nix
+++ b/nixos/modules/services/desktop-managers/plasma6.nix
@@ -238,7 +238,7 @@ in {
services.system-config-printer.enable = mkIf config.services.printing.enable (mkDefault true);
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
# Extra UDEV rules used by Solid
services.udev.packages = [
diff --git a/nixos/modules/services/display-managers/sddm.nix b/nixos/modules/services/display-managers/sddm.nix
index aaf1f0dcfc65..a6bfa213fe38 100644
--- a/nixos/modules/services/display-managers/sddm.nix
+++ b/nixos/modules/services/display-managers/sddm.nix
@@ -111,8 +111,8 @@ let
let
westonIni = (pkgs.formats.ini { }).generate "weston.ini" {
libinput = {
- enable-tap = xcfg.libinput.mouse.tapping;
- left-handed = xcfg.libinput.mouse.leftHanded;
+ enable-tap = config.services.libinput.mouse.tapping;
+ left-handed = config.services.libinput.mouse.leftHanded;
};
keyboard = {
keymap_model = xcfg.xkb.model;
diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/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";
diff --git a/nixos/modules/services/x11/desktop-managers/budgie.nix b/nixos/modules/services/x11/desktop-managers/budgie.nix
index 75ee82f1f948..b4e739029335 100644
--- a/nixos/modules/services/x11/desktop-managers/budgie.nix
+++ b/nixos/modules/services/x11/desktop-managers/budgie.nix
@@ -214,7 +214,7 @@ in {
services.geoclue2.enable = mkDefault true; # for BCC's Privacy > Location Services panel.
services.upower.enable = config.powerManagement.enable; # for Budgie's Status Indicator and BCC's Power panel.
- services.xserver.libinput.enable = mkDefault true; # for BCC's Mouse panel.
+ services.libinput.enable = mkDefault true; # for BCC's Mouse panel.
services.colord.enable = mkDefault true; # for BCC's Color panel.
services.gnome.at-spi2-core.enable = mkDefault true; # for BCC's A11y panel.
services.accounts-daemon.enable = mkDefault true; # for BCC's Users panel.
diff --git a/nixos/modules/services/x11/desktop-managers/cinnamon.nix b/nixos/modules/services/x11/desktop-managers/cinnamon.nix
index 8c29b41c8cf8..482527d1e8ad 100644
--- a/nixos/modules/services/x11/desktop-managers/cinnamon.nix
+++ b/nixos/modules/services/x11/desktop-managers/cinnamon.nix
@@ -116,7 +116,7 @@ in
services.touchegg.enable = mkDefault true;
services.udisks2.enable = true;
services.upower.enable = mkDefault config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
services.xserver.updateDbusEnvironment = true;
networking.networkmanager.enable = mkDefault true;
diff --git a/nixos/modules/services/x11/desktop-managers/deepin.nix b/nixos/modules/services/x11/desktop-managers/deepin.nix
index 680ce7b9a93e..30bd14adb419 100644
--- a/nixos/modules/services/x11/desktop-managers/deepin.nix
+++ b/nixos/modules/services/x11/desktop-managers/deepin.nix
@@ -61,7 +61,7 @@ in
services.gnome.gnome-keyring.enable = mkDefault true;
services.bamf.enable = mkDefault true;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
services.udisks2.enable = true;
services.upower.enable = mkDefault config.powerManagement.enable;
networking.networkmanager.enable = mkDefault true;
diff --git a/nixos/modules/services/x11/desktop-managers/enlightenment.nix b/nixos/modules/services/x11/desktop-managers/enlightenment.nix
index 09f90e1cd4df..0a341ba133d3 100644
--- a/nixos/modules/services/x11/desktop-managers/enlightenment.nix
+++ b/nixos/modules/services/x11/desktop-managers/enlightenment.nix
@@ -96,7 +96,7 @@ in
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
services.dbus.packages = [ e.efl ];
diff --git a/nixos/modules/services/x11/desktop-managers/gnome.nix b/nixos/modules/services/x11/desktop-managers/gnome.nix
index 95c79cf96108..a0cf56e7a920 100644
--- a/nixos/modules/services/x11/desktop-managers/gnome.nix
+++ b/nixos/modules/services/x11/desktop-managers/gnome.nix
@@ -339,7 +339,7 @@ in
# services.packagekit.enable = mkDefault true;
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center
+ services.libinput.enable = mkDefault true; # for controlling touchpad settings via gnome control center
# Explicitly enabled since GNOME will be severely broken without these.
xdg.mime.enable = true;
diff --git a/nixos/modules/services/x11/desktop-managers/lxqt.nix b/nixos/modules/services/x11/desktop-managers/lxqt.nix
index 1937bdcbd3e7..ac86c385bcc8 100644
--- a/nixos/modules/services/x11/desktop-managers/lxqt.nix
+++ b/nixos/modules/services/x11/desktop-managers/lxqt.nix
@@ -69,7 +69,7 @@ in
services.upower.enable = config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
xdg.portal.lxqt.enable = mkDefault true;
diff --git a/nixos/modules/services/x11/desktop-managers/mate.nix b/nixos/modules/services/x11/desktop-managers/mate.nix
index 520d40d67908..beae07b70dbf 100644
--- a/nixos/modules/services/x11/desktop-managers/mate.nix
+++ b/nixos/modules/services/x11/desktop-managers/mate.nix
@@ -88,7 +88,7 @@ in
services.udev.packages = [ pkgs.mate.mate-settings-daemon ];
services.gvfs.enable = true;
services.upower.enable = config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
security.pam.services.mate-screensaver.unixAuth = true;
diff --git a/nixos/modules/services/x11/desktop-managers/pantheon.nix b/nixos/modules/services/x11/desktop-managers/pantheon.nix
index 57ccbaccb0c6..008bc65eb6a4 100644
--- a/nixos/modules/services/x11/desktop-managers/pantheon.nix
+++ b/nixos/modules/services/x11/desktop-managers/pantheon.nix
@@ -159,7 +159,7 @@ in
services.gsignond.plugins = with pkgs.gsignondPlugins; [ lastfm mail oauth ];
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
services.xserver.updateDbusEnvironment = true;
services.zeitgeist.enable = mkDefault true;
services.geoclue2.enable = mkDefault true;
diff --git a/nixos/modules/services/x11/desktop-managers/plasma5.nix b/nixos/modules/services/x11/desktop-managers/plasma5.nix
index 56fcd70dc951..7d80b9b2641c 100644
--- a/nixos/modules/services/x11/desktop-managers/plasma5.nix
+++ b/nixos/modules/services/x11/desktop-managers/plasma5.nix
@@ -348,7 +348,7 @@ in
services.system-config-printer.enable = mkIf config.services.printing.enable (mkDefault true);
services.udisks2.enable = true;
services.upower.enable = config.powerManagement.enable;
- services.xserver.libinput.enable = mkDefault true;
+ services.libinput.enable = mkDefault true;
# Extra UDEV rules used by Solid
services.udev.packages = [
diff --git a/nixos/modules/services/x11/desktop-managers/xfce.nix b/nixos/modules/services/x11/desktop-managers/xfce.nix
index c55d0021b6a7..85d0d199de3f 100644
--- a/nixos/modules/services/x11/desktop-managers/xfce.nix
+++ b/nixos/modules/services/x11/desktop-managers/xfce.nix
@@ -164,7 +164,7 @@ in
services.gvfs.enable = true;
services.tumbler.enable = true;
services.system-config-printer.enable = (mkIf config.services.printing.enable (mkDefault true));
- services.xserver.libinput.enable = mkDefault true; # used in xfce4-settings-manager
+ services.libinput.enable = mkDefault true; # used in xfce4-settings-manager
# Enable default programs
programs.dconf.enable = true;
diff --git a/nixos/modules/services/x11/hardware/cmt.nix b/nixos/modules/services/x11/hardware/cmt.nix
index 55d3d840ee09..53906c5c716f 100644
--- a/nixos/modules/services/x11/hardware/cmt.nix
+++ b/nixos/modules/services/x11/hardware/cmt.nix
@@ -46,10 +46,10 @@ in {
assertions = [
{
- assertion = !config.services.xserver.libinput.enable;
+ assertion = !config.services.libinput.enable;
message = ''
cmt and libinput are incompatible, meaning you cannot enable them both.
- To use cmt you need to disable libinput with `services.xserver.libinput.enable = false`
+ To use cmt you need to disable libinput with `services.libinput.enable = false`
If you haven't enabled it in configuration.nix, it's enabled by default on a
different xserver module.
'';
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
index 4dfa917d8fb4..c43fdac6b1ec 100644
--- a/nixos/modules/services/x11/hardware/synaptics.nix
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -30,7 +30,7 @@ in {
enable = mkOption {
type = types.bool;
default = false;
- description = "Whether to enable touchpad support. Deprecated: Consider services.xserver.libinput.enable.";
+ description = "Whether to enable touchpad support. Deprecated: Consider services.libinput.enable.";
};
dev = mkOption {
@@ -207,8 +207,8 @@ in {
assertions = [
{
- assertion = !config.services.xserver.libinput.enable;
- message = "Synaptics and libinput are incompatible, you cannot enable both (in services.xserver).";
+ assertion = !config.services.libinput.enable;
+ message = "Synaptics and libinput are incompatible, you cannot enable both.";
}
];
diff --git a/nixos/tests/libinput.nix b/nixos/tests/libinput.nix
index 9b6fa159b999..b002492b1665 100644
--- a/nixos/tests/libinput.nix
+++ b/nixos/tests/libinput.nix
@@ -12,7 +12,7 @@ import ./make-test-python.nix ({ ... }:
test-support.displayManager.auto.user = "alice";
- services.xserver.libinput = {
+ services.libinput = {
enable = true;
mouse = {
naturalScrolling = true;