From af51aa79d2bb8ebedd9c241e7e3be719e3d944ed Mon Sep 17 00:00:00 2001
From: Graham Christensen <graham@grahamc.com>
Date: Wed, 30 Aug 2017 20:24:36 -0400
Subject: [PATCH 1/3] installer: add a comment hinting about enabling libinput
 for touchpads

---
 nixos/modules/installer/tools/nixos-generate-config.pl | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/nixos/modules/installer/tools/nixos-generate-config.pl b/nixos/modules/installer/tools/nixos-generate-config.pl
index 29b447912e7..f15f0861388 100644
--- a/nixos/modules/installer/tools/nixos-generate-config.pl
+++ b/nixos/modules/installer/tools/nixos-generate-config.pl
@@ -605,6 +605,9 @@ $bootLoaderConfig
   # services.xserver.layout = "us";
   # services.xserver.xkbOptions = "eurosign:e";
 
+  # Enable touchpad support.
+  # services.xserver.libinput.enable = true;
+
   # Enable the KDE Desktop Environment.
   # services.xserver.displayManager.sddm.enable = true;
   # services.xserver.desktopManager.plasma5.enable = true;

From 1b68193167af1f19502689708223fa16f8e31f50 Mon Sep 17 00:00:00 2001
From: Graham Christensen <graham@grahamc.com>
Date: Wed, 30 Aug 2017 20:25:11 -0400
Subject: [PATCH 2/3] profiles/graphical.nix: enable libinput over synaptics

---
 nixos/modules/profiles/graphical.nix | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nixos/modules/profiles/graphical.nix b/nixos/modules/profiles/graphical.nix
index e2337537518..fe9851e79a6 100644
--- a/nixos/modules/profiles/graphical.nix
+++ b/nixos/modules/profiles/graphical.nix
@@ -8,7 +8,7 @@
     enable = true;
     displayManager.sddm.enable = true;
     desktopManager.plasma5.enable = true;
-    synaptics.enable = true; # for touchpad support on many laptops
+    libinput.enable = true; # for touchpad support on many laptops
   };
 
   environment.systemPackages = [ pkgs.glxinfo ];

From 9d2777a5a5f861a727d09c3ecdeffd8c72c143b7 Mon Sep 17 00:00:00 2001
From: Graham Christensen <graham@grahamc.com>
Date: Wed, 30 Aug 2017 20:32:45 -0400
Subject: [PATCH 3/3] Mark synaptics as deprecated

---
 nixos/doc/manual/release-notes/rl-1709.xml        | 8 ++++++++
 nixos/modules/services/x11/hardware/synaptics.nix | 2 +-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/nixos/doc/manual/release-notes/rl-1709.xml b/nixos/doc/manual/release-notes/rl-1709.xml
index 91681cc6949..88b28c29118 100644
--- a/nixos/doc/manual/release-notes/rl-1709.xml
+++ b/nixos/doc/manual/release-notes/rl-1709.xml
@@ -176,6 +176,14 @@ rmdir /var/lib/ipfs/.ipfs
       removed. The system support had been broken for several years.
     </para>
   </listitem>
+  <listitem>
+    <para>
+      Touchpad support should now be enabled through
+      <literal>libinput</literal> as <literal>synaptics</literal> is
+      now deprecated. See the option
+      <literal>services.xserver.libinput.enable</literal>.
+    </para>
+  </listitem>
 </itemizedlist>
 
 <para>Other notable improvements:</para>
diff --git a/nixos/modules/services/x11/hardware/synaptics.nix b/nixos/modules/services/x11/hardware/synaptics.nix
index 54454c736c1..f032c593885 100644
--- a/nixos/modules/services/x11/hardware/synaptics.nix
+++ b/nixos/modules/services/x11/hardware/synaptics.nix
@@ -29,7 +29,7 @@ in {
       enable = mkOption {
         type = types.bool;
         default = false;
-        description = "Whether to enable touchpad support.";
+        description = "Whether to enable touchpad support. Deprecated: Consider services.xserver.libinput.enable.";
       };
 
       dev = mkOption {