mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 23:43:30 +00:00
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.
34 lines
719 B
Nix
34 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 ];
|
|
};
|
|
}
|