Commit 8eb418431bf2

Vincent Demeester <vincent@sbr.pm>
2024-07-02 14:38:00
systems/desktop: condition services.libinput…
to 24.05 or higher. Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 13ce3b7
Changed files (1)
systems
modules
systems/modules/desktop/wayland.nix
@@ -1,7 +1,8 @@
 { config, lib, pkgs, ... }:
 let
-  inherit (lib) mkIf mkEnableOption mkDefault mkForce;
+  inherit (lib) mkIf mkEnableOption mkDefault mkForce versionOlder;
   cfg = config.modules.desktop.wayland;
+  stable = versionOlder config.system.nixos.release "24.05";
 in
 {
   options = {
@@ -20,14 +21,16 @@ in
         enable = true;
       };
     };
-    services.libinput = {
-      touchpad = {
-	disableWhileTyping = true;
-	additionalOptions = ''
-	  Option "Ignore" "on"
-	'';
+    services = {} // (if stable then {} else {
+      libinput = {
+	touchpad = {
+	  disableWhileTyping = true;
+	  additionalOptions = ''
+	    Option "Ignore" "on"
+	  '';
+	};
       };
-    };
+    });
     environment.systemPackages = with pkgs; [
       qogir-icon-theme
     ];