0a37316d6c
This commit replaces a lot of usages of `mkOption` with the package type, to be `mkPackageOption`, in order to reduce the amount of code.
33 lines
719 B
Nix
33 lines
719 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.services.touchegg;
|
|
|
|
in {
|
|
meta = {
|
|
maintainers = teams.pantheon.members;
|
|
};
|
|
|
|
###### interface
|
|
options.services.touchegg = {
|
|
enable = mkEnableOption (lib.mdDoc "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 ];
|
|
};
|
|
}
|