2021-09-22 15:38:15 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
let cfg = config.services.touchegg;
|
|
|
|
|
|
|
|
in {
|
|
|
|
meta = {
|
|
|
|
maintainers = teams.pantheon.members;
|
|
|
|
};
|
|
|
|
|
|
|
|
###### interface
|
|
|
|
options.services.touchegg = {
|
2022-09-09 14:08:57 +00:00
|
|
|
enable = mkEnableOption (lib.mdDoc "touchegg, a multi-touch gesture recognizer");
|
2021-09-22 15:38:15 +00:00
|
|
|
|
|
|
|
package = mkOption {
|
|
|
|
type = types.package;
|
|
|
|
default = pkgs.touchegg;
|
2021-10-06 13:57:05 +00:00
|
|
|
defaultText = literalExpression "pkgs.touchegg";
|
2022-08-12 12:06:08 +00:00
|
|
|
description = lib.mdDoc "touchegg derivation to use.";
|
2021-09-22 15:38:15 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
###### 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 ];
|
|
|
|
};
|
|
|
|
}
|