mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
khd: add option to enable accessibility permissions
This commit is contained in:
parent
5a220c5249
commit
7f7d4bfebd
1 changed files with 9 additions and 0 deletions
|
@ -21,14 +21,23 @@ in
|
|||
example = literalExample "pkgs.khd";
|
||||
description = "This option specifies the khd package to use.";
|
||||
};
|
||||
|
||||
services.khd.enableAccessibilityAccess = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to enable accessibility permissions for the khd daemon.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
services.khd.package = mkDefault pkgs.khd;
|
||||
|
||||
security.accessibilityPrograms = [ "${cfg.package}/bin/khd" ];
|
||||
|
||||
launchd.user.agents.khd = {
|
||||
path = [ cfg.package pkgs.kwm config.environment.systemPath ];
|
||||
|
||||
serviceConfig.Program = "${cfg.package}/bin/khd";
|
||||
serviceConfig.KeepAlive = true;
|
||||
serviceConfig.ProcessType = "Interactive";
|
||||
|
|
Loading…
Reference in a new issue