about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/services/x11/touchegg.nix
blob: 660ec0b8f706fa508c63b50d5d0e6271be67e5b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ config, lib, pkgs, ... }:

with lib;

let cfg = config.services.touchegg;

in {
  meta = {
    maintainers = teams.pantheon.members;
  };

  ###### interface
  options.services.touchegg = {
    enable = mkEnableOption "touchegg, a multi-touch gesture recognizer";

    package = mkPackageOption pkgs "touchegg" { };
  };

  ###### implementation
  config = mkIf cfg.enable {
    systemd.services.touchegg = {
      description = "Touchegg Daemon";
      serviceConfig = {
        Type = "simple";
        ExecStart = "${cfg.package}/bin/touchegg --daemon";
        Restart = "on-failure";
      };
      wantedBy = [ "multi-user.target" ];
    };

    environment.systemPackages = [ cfg.package ];
  };
}