summaryrefslogtreecommitdiff
path: root/nixos/modules/hardware/touchpad.nix
blob: 30b57b96a903269e0ebcf7ad805c1794b81ea37b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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;
    };
  };
}