at 21.11-pre 1.1 kB view raw
1{ config, lib, pkgs, ... }: 2 3with lib; 4 5let 6 7 cfg = config.services.xserver.wacom; 8 9in 10 11{ 12 13 options = { 14 15 services.xserver.wacom = { 16 17 enable = mkOption { 18 type = types.bool; 19 default = false; 20 description = '' 21 Whether to enable the Wacom touchscreen/digitizer/tablet. 22 If you ever have any issues such as, try switching to terminal (ctrl-alt-F1) and back 23 which will make Xorg reconfigure the device ? 24 25 If you're not satisfied by the default behaviour you can override 26 <option>environment.etc."X11/xorg.conf.d/70-wacom.conf"</option> in 27 configuration.nix easily. 28 ''; 29 }; 30 31 }; 32 33 }; 34 35 36 config = mkIf cfg.enable { 37 38 environment.systemPackages = [ pkgs.xf86_input_wacom ]; # provides xsetwacom 39 40 services.xserver.modules = [ pkgs.xf86_input_wacom ]; 41 42 services.udev.packages = [ pkgs.xf86_input_wacom ]; 43 44 environment.etc."X11/xorg.conf.d/70-wacom.conf".source = "${pkgs.xf86_input_wacom}/share/X11/xorg.conf.d/70-wacom.conf"; 45 46 }; 47 48}