Merge pull request #285138 from michaelBelsanti/espanso
nixos/espanso: add wayland and package option
This commit is contained in:
commit
8036f1ffa7
@ -6,19 +6,25 @@ in {
|
||||
meta = { maintainers = with lib.maintainers; [ numkem ]; };
|
||||
|
||||
options = {
|
||||
services.espanso = { enable = options.mkEnableOption "Espanso"; };
|
||||
services.espanso = {
|
||||
enable = mkEnableOption "Espanso";
|
||||
package = mkPackageOption pkgs "espanso" {
|
||||
example = "pkgs.espanso-wayland";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.espanso.package = mkIf cfg.wayland pkgs.espanso-wayland;
|
||||
systemd.user.services.espanso = {
|
||||
description = "Espanso daemon";
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.espanso}/bin/espanso daemon";
|
||||
ExecStart = "${lib.getExe cfg.package} daemon";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.espanso ];
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user