From 0f0be5e498ac29e9011c7a29a7612871c0bc393f Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Wed, 3 Aug 2016 08:15:18 +0200 Subject: [PATCH] Warn for conflict between synaptics and libinput --- nixos/modules/services/x11/hardware/libinput.nix | 8 ++++++++ nixos/modules/services/x11/hardware/synaptics.nix | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/nixos/modules/services/x11/hardware/libinput.nix b/nixos/modules/services/x11/hardware/libinput.nix index 14c7131e611c..47ce9e566045 100644 --- a/nixos/modules/services/x11/hardware/libinput.nix +++ b/nixos/modules/services/x11/hardware/libinput.nix @@ -227,6 +227,14 @@ in { EndSection ''; + assertions = [ + # already present in synaptics.nix + /* { + assertion = !config.services.xserver.synaptics.enable; + message = "Synaptics and libinput are incompatible, you cannot enable both (in services.xserver)."; + } */ + ]; + }; } diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix index e74b19c8e710..5c068e89dd71 100644 --- a/nixos/modules/services/x11/hardware/synaptics.nix +++ b/nixos/modules/services/x11/hardware/synaptics.nix @@ -205,6 +205,13 @@ in { EndSection ''; + assertions = [ + { + assertion = !config.services.xserver.libinput.enable; + message = "Synaptics and libinput are incompatible, you cannot enable both (in services.xserver)."; + } + ]; + }; }