diff options
author | Kevin Cox <kevincox@kevincox.ca> | 2021-01-05 08:20:39 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 08:20:39 -0500 |
commit | e10ef1faec06abf2dce04d87ee671164969b68ef (patch) | |
tree | c4f73c6ead95a510391399a6bd1f07e8483cd96f /nixos | |
parent | 0d7ccb77915b54f28c2ceb95e4a59f11c2826593 (diff) | |
parent | a2391053b6cceb1933b99f656f8b3a39b8df411c (diff) |
Merge pull request #108131 from thiagokokada/opentabletdriver-misc-improvements
opentabletdriver: misc improvements to package/module
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/hardware/opentabletdriver.nix | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/nixos/modules/hardware/opentabletdriver.nix b/nixos/modules/hardware/opentabletdriver.nix index b759bcf034ee..0f34d903f68b 100644 --- a/nixos/modules/hardware/opentabletdriver.nix +++ b/nixos/modules/hardware/opentabletdriver.nix @@ -24,6 +24,15 @@ in ''; }; + package = mkOption { + type = types.package; + default = pkgs.opentabletdriver; + defaultText = "pkgs.opentabletdriver"; + description = '' + OpenTabletDriver derivation to use. + ''; + }; + daemon = { enable = mkOption { default = true; @@ -37,9 +46,9 @@ in }; config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ opentabletdriver ]; + environment.systemPackages = [ cfg.package ]; - services.udev.packages = with pkgs; [ opentabletdriver ]; + services.udev.packages = [ cfg.package ]; boot.blacklistedKernelModules = cfg.blacklistedKernelModules; @@ -50,7 +59,7 @@ in serviceConfig = { Type = "simple"; - ExecStart = "${opentabletdriver}/bin/otd-daemon -c ${opentabletdriver}/lib/OpenTabletDriver/Configurations"; + ExecStart = "${cfg.package}/bin/otd-daemon -c ${cfg.package}/lib/OpenTabletDriver/Configurations"; Restart = "on-failure"; }; }; |