From 2478c8bf01cbb85ce15d32f01af053a00fd9ed82 Mon Sep 17 00:00:00 2001 From: Bobby Rong Date: Sat, 7 Aug 2021 12:04:39 +0800 Subject: [PATCH] nixos/touchegg: init --- nixos/modules/module-list.nix | 1 + nixos/modules/services/x11/touchegg.nix | 38 +++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 nixos/modules/services/x11/touchegg.nix diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 48c86a00f87..b556afae653 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -1055,6 +1055,7 @@ ./services/x11/gdk-pixbuf.nix ./services/x11/imwheel.nix ./services/x11/redshift.nix + ./services/x11/touchegg.nix ./services/x11/urserver.nix ./services/x11/urxvtd.nix ./services/x11/window-managers/awesome.nix diff --git a/nixos/modules/services/x11/touchegg.nix b/nixos/modules/services/x11/touchegg.nix new file mode 100644 index 00000000000..fab7fac3f01 --- /dev/null +++ b/nixos/modules/services/x11/touchegg.nix @@ -0,0 +1,38 @@ +{ 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 = mkOption { + type = types.package; + default = pkgs.touchegg; + defaultText = "pkgs.touchegg"; + description = "touchegg derivation to use."; + }; + }; + + ###### 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 ]; + }; +}