0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

Merge pull request #285138 from michaelBelsanti/espanso

nixos/espanso: add wayland and package option
This commit is contained in:
Sandro 2024-05-19 19:15:22 +02:00 committed by GitHub
commit 8036f1ffa7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,19 +6,25 @@ in {
meta = { maintainers = with lib.maintainers; [ numkem ]; }; meta = { maintainers = with lib.maintainers; [ numkem ]; };
options = { options = {
services.espanso = { enable = options.mkEnableOption "Espanso"; }; services.espanso = {
enable = mkEnableOption "Espanso";
package = mkPackageOption pkgs "espanso" {
example = "pkgs.espanso-wayland";
};
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.espanso.package = mkIf cfg.wayland pkgs.espanso-wayland;
systemd.user.services.espanso = { systemd.user.services.espanso = {
description = "Espanso daemon"; description = "Espanso daemon";
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.espanso}/bin/espanso daemon"; ExecStart = "${lib.getExe cfg.package} daemon";
Restart = "on-failure"; Restart = "on-failure";
}; };
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
}; };
environment.systemPackages = [ pkgs.espanso ]; environment.systemPackages = [ cfg.package ];
}; };
} }