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