mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-04-16 01:06:55 +00:00
The accessibility database has been protected with SIP since macOS 10.12 and there doesn't seem to be another way to configure this programmatically.
28 lines
710 B
Nix
28 lines
710 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
in
|
|
|
|
{
|
|
options = {
|
|
|
|
nix.profile = mkOption { internal = true; default = null; };
|
|
security.enableAccessibilityAccess = mkOption { internal = true; default = null; };
|
|
security.accessibilityPrograms = mkOption { internal = true; default = null; };
|
|
|
|
};
|
|
|
|
config = {
|
|
|
|
assertions =
|
|
[ { assertion = config.nix.profile == null; message = "nix.profile was renamed to nix.package"; }
|
|
{ assertion = config.security.enableAccessibilityAccess == null; message = "security.enableAccessibilityAccess was removed, it's broken since 10.12 because of SIP"; }
|
|
];
|
|
|
|
nix.package = mkIf (config.nix.profile != null) config.nix.profile;
|
|
|
|
};
|
|
}
|