1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7
8with lib;
9
10let
11 cfg = config.services.touchegg;
12
13in
14{
15 meta = {
16 maintainers = teams.pantheon.members;
17 };
18
19 ###### interface
20 options.services.touchegg = {
21 enable = mkEnableOption "touchegg, a multi-touch gesture recognizer";
22
23 package = mkPackageOption pkgs "touchegg" { };
24 };
25
26 ###### implementation
27 config = mkIf cfg.enable {
28 systemd.services.touchegg = {
29 description = "Touchegg Daemon";
30 serviceConfig = {
31 Type = "simple";
32 ExecStart = "${cfg.package}/bin/touchegg --daemon";
33 Restart = "on-failure";
34 };
35 wantedBy = [ "multi-user.target" ];
36 };
37
38 environment.systemPackages = [ cfg.package ];
39 };
40}