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