mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-15 21:08:21 +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";
|
example = literalExample "pkgs.khd";
|
||||||
description = "This option specifies the khd package to use.";
|
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 {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
services.khd.package = mkDefault pkgs.khd;
|
services.khd.package = mkDefault pkgs.khd;
|
||||||
|
|
||||||
|
security.accessibilityPrograms = [ "${cfg.package}/bin/khd" ];
|
||||||
|
|
||||||
launchd.user.agents.khd = {
|
launchd.user.agents.khd = {
|
||||||
path = [ cfg.package pkgs.kwm config.environment.systemPath ];
|
path = [ cfg.package pkgs.kwm config.environment.systemPath ];
|
||||||
|
|
||||||
serviceConfig.Program = "${cfg.package}/bin/khd";
|
serviceConfig.Program = "${cfg.package}/bin/khd";
|
||||||
serviceConfig.KeepAlive = true;
|
serviceConfig.KeepAlive = true;
|
||||||
serviceConfig.ProcessType = "Interactive";
|
serviceConfig.ProcessType = "Interactive";
|
||||||
|
|
Loading…
Add table
Reference in a new issue