at 17.09-beta 1.0 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 default = false; 19 description = '' 20 Whether to enable the Wacom touchscreen/digitizer/tablet. 21 If you ever have any issues such as, try switching to terminal (ctrl-alt-F1) and back 22 which will make Xorg reconfigure the device ? 23 24 If you're not satisfied by the default behaviour you can override 25 <option>environment.etc."X11/xorg.conf.d/70-wacom.conf"</option> in 26 configuration.nix easily. 27 ''; 28 }; 29 30 }; 31 32 }; 33 34 35 config = mkIf cfg.enable { 36 37 environment.systemPackages = [ pkgs.xf86_input_wacom ]; # provides xsetwacom 38 39 services.xserver.modules = [ pkgs.xf86_input_wacom ]; 40 41 services.udev.packages = [ pkgs.xf86_input_wacom ]; 42 43 environment.etc."X11/xorg.conf.d/70-wacom.conf".source = "${pkgs.xf86_input_wacom}/share/X11/xorg.conf.d/70-wacom.conf"; 44 45 }; 46 47}