LnL7 / nix-darwin

nix modules for darwin
MIT License
3.18k stars 457 forks source link

Could not write domain com.apple.universalaccess during fresh nix-darwin install on a flake #1049

Open aspauldingcode opened 2 months ago

aspauldingcode commented 2 months ago

My custom config is https://github.com/aspauldingcode/.dotfiles and the first rebuild to install nix-darwin and build with the project flake fails with the command:

nix run --extra-experimental-features "nix-command flakes" nix-darwin -- switch --flake ~/.dotfiles#NIXY

My darwin-defaults.nix: https://github.com/aspauldingcode/.dotfiles/blob/766f3b87cb6782e932e60a7a2be8e837c7d5ca40/system/NIXY/modules/darwin-defaults.nix#L88

which contains system.defaults.universalaccess = { mouseDriverCursorSize = 1.2; reduceMotion = true; reduceTransparency = true; };

which after commenting out, it will work and then I can add it back it will work.

aspauldingcode commented 2 months ago

Why does this fail initially?

dustypomerleau commented 2 months ago

Could you post the error when it fails? One common issue is that setting any of the universal access settings requires you to give full disk access to the terminal you're using via System Settings > Privacy & Security > Full Disk Access.

jadc commented 2 months ago

Could you post the error when it fails? One common issue is that setting any of the universal access settings requires you to give full disk access to the terminal you're using via System Settings > Privacy & Security > Full Disk Access.

This fixed the issue for me.

aspauldingcode commented 2 months ago

Could you post the error when it fails?

That might take me some time.. I don't think I can reset my laptop until the end of the semester for college.

But, I will get back to you if I don't forget.

aspauldingcode commented 2 months ago

Is there a command that can solve this? I really don't want to have to manually click sh*t on macOS to set this up

aspauldingcode commented 1 month ago

I got the perfect idea - Throw an error or warning message when this fails to compile based on this permissions issue specific setting!