1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-13 20:30:02 +00:00

security: add enableAccessibilityAccess option

This commit is contained in:
Daiderd Jordan 2017-05-24 22:55:20 +02:00
parent aebf57d677
commit fa843a70ca
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 9 additions and 15 deletions

View file

@ -15,6 +15,12 @@ in
{
options = {
security.enableAccessibilityAccess = mkOption {
type = types.bool;
default = false;
description = "Wether to configure programs that are allowed control through the accessibility APIs.";
};
security.accessibilityPrograms = mkOption {
type = types.listOf types.path;
default = [];
@ -25,7 +31,7 @@ in
config = {
system.activationScripts.accessibility.text = ''
system.activationScripts.accessibility.text = mkIf cfg.enableAccessibilityAccess ''
# Set up programs that require accessibility permissions
echo "setting up accessibility programs..." >&2

View file

@ -25,12 +25,6 @@ in
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.";
};
services.khd.khdConfig = mkOption {
type = types.lines;
default = "";
@ -48,7 +42,7 @@ in
services.khd.khdConfig = mkIf cfg.i3Keybindings i3Config;
security.accessibilityPrograms = mkIf cfg.enableAccessibilityAccess [ "${cfg.package}/bin/khd" ];
security.accessibilityPrograms = [ "${cfg.package}/bin/khd" ];
environment.etc."khdrc".text = cfg.khdConfig;

View file

@ -23,12 +23,6 @@ in
description = "This option specifies the kwm package to use";
};
services.kwm.enableAccessibilityAccess = mkOption {
type = types.bool;
default = false;
description = "Whether to enable accessibility permissions for the kwm daemon.";
};
services.kwm.kwmConfig = mkOption {
type = types.lines;
default = "";
@ -38,7 +32,7 @@ in
config = mkIf cfg.enable {
security.accessibilityPrograms = mkIf cfg.enableAccessibilityAccess [ "${cfg.package}/kwm" ];
security.accessibilityPrograms = [ "${cfg.package}/kwm" ];
environment.etc."kwmrc".text = cfg.kwmConfig;