8 cfg = config.hardware.opentabletdriver;
11 meta.maintainers = with lib.maintainers; [ thiagokokada ];
14 hardware.opentabletdriver = {
15 enable = lib.mkOption {
17 type = lib.types.bool;
19 Enable OpenTabletDriver udev rules, user service and blacklist kernel
20 modules known to conflict with OpenTabletDriver.
24 blacklistedKernelModules = lib.mkOption {
25 type = lib.types.listOf lib.types.str;
31 Blacklist of kernel modules known to conflict with OpenTabletDriver.
35 package = lib.mkPackageOption pkgs "opentabletdriver" { };
38 enable = lib.mkOption {
40 type = lib.types.bool;
42 Whether to start OpenTabletDriver daemon as a systemd user service.
49 config = lib.mkIf cfg.enable {
50 environment.systemPackages = [ cfg.package ];
52 services.udev.packages = [ cfg.package ];
54 boot.blacklistedKernelModules = cfg.blacklistedKernelModules;
56 systemd.user.services.opentabletdriver =
58 lib.mkIf cfg.daemon.enable {
59 description = "Open source, cross-platform, user-mode tablet driver";
60 wantedBy = [ "graphical-session.target" ];
61 partOf = [ "graphical-session.target" ];
65 ExecStart = "${cfg.package}/bin/otd-daemon";
66 Restart = "on-failure";