diff options
author | Thiago Kenji Okada <thiagokokada@gmail.com> | 2021-01-01 18:14:06 -0300 |
---|---|---|
committer | Thiago Kenji Okada <thiagokokada@gmail.com> | 2021-01-02 14:09:31 -0300 |
commit | a2391053b6cceb1933b99f656f8b3a39b8df411c (patch) | |
tree | 1987e983133ef4abb8ceadefad25f7cd0d49433d /nixos | |
parent | 0a1493646698f7176469d06dbeedd45632f15059 (diff) |
nixos/opentabletdriver: add package option
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"; }; }; |