nixpkgs/nixos/modules/services/desktops/espanso.nix
Nathan Henrie de322fa088 nixos/espanso: add n8henrie to maintainers
I help maintain espanso and would like to help maintain both the package
and the module.
2024-07-21 17:08:24 -06:00

31 lines
751 B
Nix

{ 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 ];
};
}