diff options
-rw-r--r-- | nixos/modules/hardware/touchpad.nix | 24 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 |
2 files changed, 25 insertions, 0 deletions
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; + }; + }; +} diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 92b2cf6..9b29135 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1,6 +1,7 @@ [ ./hardware/keyboard.nix ./hardware/linode.nix + ./hardware/touchpad.nix ./hardware/yubikey.nix ./location.nix ./nix.nix |