1 { config, lib, pkgs, ... }:
4 let cfg = config.services.espanso;
6 meta = { maintainers = with lib.maintainers; [ n8henrie numkem ]; };
10 enable = mkEnableOption "Espanso";
11 wayland = mkEnableOption "use the Wayland compatible espanso package";
12 package = mkPackageOption pkgs "espanso" {
13 example = "pkgs.espanso-wayland";
18 config = mkIf cfg.enable {
19 systemd.user.services.espanso = {
20 description = "Espanso daemon";
22 ExecStart = "${lib.getExe cfg.package} daemon";
23 Restart = "on-failure";
25 wantedBy = [ "default.target" ];
28 environment.systemPackages = [ cfg.package ];