blob: 4a9bff9267a43a7a08bf5f8b4090c21e13b68617 (
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
|
{ config, lib, pkgs, ... }:
with lib;
let cfg = config.services.espanso;
in {
meta = { maintainers = with lib.maintainers; [ n8henrie numkem ]; };
options = {
services.espanso = {
enable = mkEnableOption "Espanso";
wayland = mkEnableOption "use the Wayland compatible espanso package";
package = mkPackageOption pkgs "espanso" {
example = "pkgs.espanso-wayland";
};
};
};
config = mkIf cfg.enable {
systemd.user.services.espanso = {
description = "Espanso daemon";
serviceConfig = {
ExecStart = "${lib.getExe cfg.package} daemon";
Restart = "on-failure";
};
wantedBy = [ "default.target" ];
};
environment.systemPackages = [ cfg.package ];
};
}
|