Skip to content

Commit

Permalink
Merge pull request #285138 from michaelBelsanti/espanso
Browse files Browse the repository at this point in the history
nixos/espanso: add wayland and package option
  • Loading branch information
SuperSandro2000 authored May 19, 2024
2 parents 6c0b7a9 + 2c9c781 commit 8036f1f
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions nixos/modules/services/desktops/espanso.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 ];
};
}

0 comments on commit 8036f1f

Please sign in to comment.