2020-08-25 00:37:33 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
let cfg = config.services.espanso;
|
|
|
|
in {
|
|
|
|
meta = { maintainers = with lib.maintainers; [ numkem ]; };
|
|
|
|
|
|
|
|
options = {
|
2022-09-01 17:44:36 +00:00
|
|
|
services.espanso = { enable = options.mkEnableOption (lib.mdDoc "Espanso"); };
|
2020-08-25 00:37:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf cfg.enable {
|
|
|
|
systemd.user.services.espanso = {
|
|
|
|
description = "Espanso daemon";
|
|
|
|
serviceConfig = {
|
|
|
|
ExecStart = "${pkgs.espanso}/bin/espanso daemon";
|
|
|
|
Restart = "on-failure";
|
|
|
|
};
|
|
|
|
wantedBy = [ "default.target" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = [ pkgs.espanso ];
|
|
|
|
};
|
|
|
|
}
|