system.nix
1 _: { 2 config.system = { 3 keyboard = { 4 enableKeyMapping = true; 5 remapCapsLockToControl = true; 6 }; 7 8 defaults = { 9 controlcenter = { 10 # Hide icons from the menubar 11 AirDrop = false; 12 Bluetooth = false; 13 Display = false; 14 FocusModes = false; 15 NowPlaying = false; 16 Sound = false; 17 18 BatteryShowPercentage = true; 19 }; 20 21 CustomUserPreferences = { 22 "com.apple.AdLib" = { 23 allowApplePersonalizedAdvertising = false; 24 allowIdentifierForAdvertising = false; 25 forceLimitAdTracking = true; 26 personlizeddsMigrted = false; 27 }; 28 29 "com.apple.desktopservices" = { 30 # Avoid creating .DS_Store files on network or USB volumes 31 DSDontWriteNetworkStores = true; 32 DSDontWriteUSBStores = true; 33 }; 34 35 "com.apple.SoftwareUpdate" = { 36 AutomaticCheckEnabled = true; 37 38 # Check for software updates daily, not just once per week 39 ScheduleFrequency = 1; 40 # Download newly available updates in background 41 AutomaticDownload = 1; 42 # Install System data files & security updates 43 CriticalUpdateInstall = 1; 44 }; 45 46 # Disable UI sounds 47 "com.apple.sound.uiaudio".enabled = false; 48 49 # Displays have separate spaces 50 "com.apple.spaces"."spans-displays" = 0; 51 52 "com.apple.WindowManager" = { 53 EnableStandardClickToShowDesktop = 0; # Click wallpaper to reveal desktop 54 StandardHideDesktopIcons = 0; # Show items on desktop 55 HideDesktop = 0; # Do not hide items on desktop & stage manager 56 StageManagerHideWidgets = 0; 57 StandardHideWidgets = 0; 58 }; 59 60 "dev.kdrag0n.MacVirt" = { 61 SUHasLaunchedBefore = 1; 62 SUAutomaticallyUpdate = 0; 63 }; 64 }; 65 66 dock = { 67 autohide = true; 68 autohide-delay = 0.0; 69 autohide-time-modifier = 0.0; 70 dashboard-in-overlay = true; 71 launchanim = false; 72 mineffect = "scale"; 73 minimize-to-application = false; 74 mouse-over-hilite-stack = true; 75 orientation = "left"; 76 static-only = true; 77 tilesize = 48; 78 79 # enable spring loading (hold a dragged file over an icon to drop/open it there) 80 enable-spring-load-actions-on-all-items = true; 81 82 # do not show recent applications in the dock 83 show-recents = false; 84 85 # show indicator lights for open applications 86 show-process-indicators = true; 87 88 # show hidden applications as translucent 89 showhidden = true; 90 }; 91 92 finder = { 93 # Finder: show all filename extensions 94 AppleShowAllExtensions = true; 95 FXEnableExtensionChangeWarning = false; 96 QuitMenuItem = true; 97 98 # show the full POSIX path as Finder's window title 99 _FXShowPosixPathInTitle = true; 100 }; 101 102 NSGlobalDomain = { 103 # Set Locale 104 AppleMeasurementUnits = "Centimeters"; 105 AppleMetricUnits = 1; 106 AppleTemperatureUnit = "Celsius"; 107 108 # Hide scrollbars 109 AppleShowScrollBars = "WhenScrolling"; 110 111 # disable automatic typography options 112 NSAutomaticCapitalizationEnabled = false; 113 NSAutomaticDashSubstitutionEnabled = false; 114 NSAutomaticPeriodSubstitutionEnabled = false; 115 NSAutomaticQuoteSubstitutionEnabled = false; 116 NSAutomaticSpellingCorrectionEnabled = false; 117 118 # always expand the print panel 119 PMPrintingExpandedStateForPrint = true; 120 PMPrintingExpandedStateForPrint2 = true; 121 122 # expand the save panel by default 123 NSNavPanelExpandedStateForSaveMode = true; 124 NSNavPanelExpandedStateForSaveMode2 = true; 125 126 # Force dark mode globally 127 AppleInterfaceStyle = "Dark"; 128 AppleInterfaceStyleSwitchesAutomatically = false; 129 130 # Enable full keyboard access for all controls 131 # (e.g. enable Tab in modal dialogs) 132 AppleKeyboardUIMode = 3; 133 134 # Disable press-and-hold for keys in favor of key repeat 135 ApplePressAndHoldEnabled = false; 136 137 # Set faster keyboard repeat rate 138 KeyRepeat = 1; 139 InitialKeyRepeat = 30; 140 141 # Enable subpixel font rendering on non-Apple LCDs 142 # Reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501 143 AppleFontSmoothing = 1; 144 }; 145 }; 146 147 stateVersion = 5; 148 }; 149 }