mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 23:23:07 +00:00
de322fa088
I help maintain espanso and would like to help maintain both the package and the module.
31 lines
751 B
Nix
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 ];
|
|
};
|
|
}
|