7bc014aa9c
GitOrigin-RevId: c97e777ff06fcb8d37dcdf5e21e9eff1f34f0e90
24 lines
578 B
Nix
24 lines
578 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
let cfg = config.services.espanso;
|
|
in {
|
|
meta = { maintainers = with lib.maintainers; [ numkem ]; };
|
|
|
|
options = {
|
|
services.espanso = { enable = options.mkEnableOption (lib.mdDoc "Espanso"); };
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|