From 6250cb03ef08c989fdcc0edccafe2a222b6a159e Mon Sep 17 00:00:00 2001 From: Ethel Morgan Date: Wed, 1 Jul 2020 20:09:24 +0100 Subject: add eth.hardware.touchpad module --- nixos/modules/hardware/touchpad.nix | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 nixos/modules/hardware/touchpad.nix (limited to 'nixos/modules/hardware/touchpad.nix') diff --git a/nixos/modules/hardware/touchpad.nix b/nixos/modules/hardware/touchpad.nix new file mode 100644 index 0000000..30b57b9 --- /dev/null +++ b/nixos/modules/hardware/touchpad.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: +with lib; + +let + cfg = config.eth.hardware.touchpad; + +in { + options.eth.hardware.touchpad = { + enable = mkEnableOption "Enable the touchpad."; + + naturalScrolling = mkOption { + type = types.bool; + description = "The good scrolling."; + default = false; + }; + }; + + config = mkIf cfg.enable { + services.xserver.libinput = { + enable = true; + naturalScrolling = cfg.naturalScrolling; + }; + }; +} -- cgit v1.2.3