File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 9797 } ;
9898
9999 defaults = {
100+ # https://macos-defaults.com/
100101 NSGlobalDomain . ApplePressAndHoldEnabled = false ;
101102 NSGlobalDomain . AppleShowAllExtensions = true ;
102103 NSGlobalDomain . KeyRepeat = 4 ;
115116 # https://apple.stackexchange.com/a/462849
116117 NSGlobalDomain . NSInitialToolTipDelay = 800 ;
117118
119+ # https://apple.stackexchange.com/a/424110
120+ # This requires to grant full disk access to the terminal!
121+ "com.apple.universalaccess" . showWindowTitlebarIcons = true ;
122+
118123 # tweaks
119124 "com.apple.finder" . QuitMenuItem = true ;
120125 "com.apple.finder" . PathBarRootAtHome = true ;
124129 } ;
125130 } ;
126131
132+ home . activation . checkFullDiskAccess = lib . mkIf pkgs . stdenv . isDarwin (
133+ lib . hm . dag . entryBefore [ "setDarwinDefaults" "writeBoundary" ] ''
134+ if ! run --quiet plutil -lint /Library/Preferences/com.apple.TimeMachine.plist; then
135+ errorEcho "Full Disk Access is not granted to the current terminal!"
136+ run open "x-apple.systempreferences:com.apple.preference.security?Privacy_All"
137+ exit 1
138+ fi
139+ ''
140+ ) ;
141+
127142 programs . direnv = {
128143 enable = true ;
129144 nix-direnv . enable = true ;
You can’t perform that action at this time.
0 commit comments