bcb2f287e1
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
29 lines
665 B
Nix
29 lines
665 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
let cfg = config.services.espanso;
|
|
in {
|
|
meta = { maintainers = with lib.maintainers; [ numkem ]; };
|
|
|
|
options = {
|
|
services.espanso = {
|
|
enable = mkEnableOption "Espanso";
|
|
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 ];
|
|
};
|
|
}
|