nixos/opentabletdriver: add package option
This commit is contained in:
parent
0a14936466
commit
a2391053b6
@ -24,6 +24,15 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
package = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
default = pkgs.opentabletdriver;
|
||||||
|
defaultText = "pkgs.opentabletdriver";
|
||||||
|
description = ''
|
||||||
|
OpenTabletDriver derivation to use.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
daemon = {
|
daemon = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
default = true;
|
default = true;
|
||||||
@ -37,9 +46,9 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
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;
|
boot.blacklistedKernelModules = cfg.blacklistedKernelModules;
|
||||||
|
|
||||||
@ -50,7 +59,7 @@ in
|
|||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
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";
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user