my over complex system configurations dotfiles.isabelroses.com/
nixos nix flake dotfiles linux
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(darwin): system prefrences

isabel 1e6509a0 1d34dfde

+140 -109
-84
modules/darwin/config.nix
··· 1 - # All the configuration options are documented here: https://daiderd.com/nix-darwin/manual/index.html#sec-options 2 - # Incomplete list of macOS `defaults` commands: https://macos-defaults.com/ 3 - { 4 - system.defaults = { 5 - loginwindow = { 6 - GuestEnabled = false; # disable guest user 7 - SHOWFULLNAME = false; # show full name in login window 8 - }; 9 - 10 - menuExtraClock = { 11 - Show24Hour = true; # show 12 hour clock 12 - IsAnalog = false; # show digital clock 13 - ShowAMPM = true; # show AM/PM 14 - 15 - # Show date can imply the result of ShowDayOfMonth, ShowDayOfWeek, and ShowSeconds. 16 - ShowDate = 2; # 0 = Show the date 1 = Don’t show 2 = Don’t show (hides date) 17 - # ShowDayOfMonth = false; # show day of month 18 - # ShowDayOfWeek = false; # show day of week 19 - # ShowSeconds = false; # show seconds 20 - }; 21 - 22 - dock = { 23 - autohide = true; 24 - autohide-delay = 0.0; # autohide delay 25 - autohide-time-modifier = 1.0; # autohide animation duration 26 - 27 - orientation = "bottom"; # dock position 28 - tilesize = 1; # dock icon size 29 - 30 - static-only = false; # show running apps 31 - show-recents = false; # disable recent apps 32 - showhidden = false; # show hidden apps 33 - mru-spaces = false; # disable recent spaces 34 - 35 - # customize Hot Corners 36 - # wvous-tl-corner = 2; # top-left - Mission Control 37 - # wvous-tr-corner = 13; # top-right - Lock Screen 38 - # wvous-bl-corner = 3; # bottom-left - Application Windows 39 - # wvous-br-corner = 4; # bottom-right - Desktop 40 - }; 41 - 42 - finder = { 43 - _FXShowPosixPathInTitle = true; # show full path in finder title 44 - # FXRemoveOldTrashItems = true; # remove items from trash after 30 days 45 - AppleShowAllExtensions = true; # show all file extensions 46 - AppleShowAllFiles = true; # show hidden files 47 - FXEnableExtensionChangeWarning = false; # disable warning when changing file extension 48 - QuitMenuItem = true; # hide the quit button on finder 49 - ShowPathbar = true; # show path bar 50 - ShowStatusBar = true; # show status bar 51 - 52 - # cusomize the desktop 53 - CreateDesktop = false; # disable icons on the desktop 54 - }; 55 - 56 - NSGlobalDomain = { 57 - AppleICUForce24HourTime = false; # use 12 hour time 58 - 59 - "com.apple.swipescrolldirection" = false; # enable natural scrolling 60 - "com.apple.sound.beep.feedback" = 0; # disable beep sound when pressing volume up/down key 61 - "com.apple.sound.beep.volume" = null; # disable beep sound 62 - "com.apple.keyboard.fnState" = true; # use function keys as standard function keys 63 - 64 - AppleInterfaceStyle = "Dark"; # dark mode 65 - AppleKeyboardUIMode = 3; # Mode 3 enables full keyboard control. 66 - 67 - ApplePressAndHoldEnabled = false; # enable press and hold 68 - # If you press and hold certain keyboard keys when in a text area, the key’s character begins to repeat. 69 - # This is very useful for vim users, they use `hjkl` to move cursor. 70 - # sets how long it takes before it starts repeating. 71 - InitialKeyRepeat = 15; # normal minimum is 15 (225 ms), maximum is 120 (1800 ms) 72 - # sets how fast it repeats once it starts. 73 - KeyRepeat = 3; # normal minimum is 2 (30 ms), maximum is 120 (1800 ms) 74 - 75 - NSAutomaticCapitalizationEnabled = false; # disable auto capitalization 76 - NSAutomaticDashSubstitutionEnabled = false; # disable auto dash substitution 77 - NSAutomaticPeriodSubstitutionEnabled = false; # disable auto period substitution 78 - NSAutomaticQuoteSubstitutionEnabled = false; # disable auto quote substitution 79 - NSAutomaticSpellingCorrectionEnabled = false; # disable auto spelling correction 80 - NSNavPanelExpandedStateForSaveMode = true; # expand save panel by default 81 - NSNavPanelExpandedStateForSaveMode2 = true; # ^ 82 - }; 83 - }; 84 - }
+1 -1
modules/darwin/default.nix
··· 2 2 imports = [ 3 3 ./brew # homebrew the package manager 4 4 ./hardware # hardware config - i.e. keyboard 5 + ./prefrences # system preferences 5 6 ./services # services exclusive to nix-darwin 6 7 7 8 ./activation.nix # run when we start the system 8 - ./config.nix # native nix-darwin configuration 9 9 ./non-native.nix # functionality not provided by nix-darwin 10 10 ./security.nix # security settings 11 11 ./nix.nix # nix settings that can only be applied to nix-darwin
+26 -9
modules/darwin/hardware/keyboard.nix
··· 2 2 # keyboard settings is not very useful on macOS 3 3 # the most important thing is to remap option key to alt key globally, 4 4 # but it's not supported by macOS yet. 5 - system.keyboard = { 6 - enableKeyMapping = true; # enable key mapping so that we can use `option` as `control` 5 + system = { 6 + keyboard = { 7 + enableKeyMapping = true; # enable key mapping so that we can use `option` as `control` 8 + 9 + # NOTE: do NOT support remap capslock to both control and escape at the same time 10 + remapCapsLockToControl = false; # remap caps lock to control 11 + remapCapsLockToEscape = true; # remap caps lock to escape 12 + 13 + # swap left command and left alt 14 + # so it matches common keyboard layout: `ctrl | command | alt` 15 + # disabled as it only causes problems 16 + swapLeftCommandAndLeftAlt = false; 17 + }; 18 + 19 + defaults.NSGlobalDomain = { 20 + # Use F1, F2, etc. keys as standard function keys. 21 + "com.apple.keyboard.fnState" = true; 7 22 8 - # NOTE: do NOT support remap capslock to both control and escape at the same time 9 - remapCapsLockToControl = false; # remap caps lock to control 10 - remapCapsLockToEscape = true; # remap caps lock to escape 23 + AppleKeyboardUIMode = 3; # Mode 3 enables full keyboard control. 11 24 12 - # swap left command and left alt 13 - # so it matches common keyboard layout: `ctrl | command | alt` 14 - # disabled as it only causes problems 15 - swapLeftCommandAndLeftAlt = false; 25 + ApplePressAndHoldEnabled = false; # enable press and hold 26 + # If you press and hold certain keyboard keys when in a text area, the key’s character begins to repeat. 27 + # This is very useful for vim users, they use `hjkl` to move cursor. 28 + # sets how long it takes before it starts repeating. 29 + InitialKeyRepeat = 15; # normal minimum is 15 (225 ms), maximum is 120 (1800 ms) 30 + # sets how fast it repeats once it starts. 31 + KeyRepeat = 3; # normal minimum is 2 (30 ms), maximum is 120 (1800 ms) 32 + }; 16 33 }; 17 34 }
+8 -4
modules/darwin/hardware/trackpad.nix
··· 1 1 { 2 - system.defaults.trackpad = { 3 - Clicking = true; # enable tap to click 4 - TrackpadRightClick = true; # enable two finger right click 5 - TrackpadThreeFingerDrag = false; # enable three finger drag, disabled so I can swap workspaces with 3 fingers 2 + system.defaults = { 3 + NSGlobalDomain."com.apple.swipescrolldirection" = false; # enable natural scrolling 4 + 5 + trackpad = { 6 + Clicking = true; # enable tap to click 7 + TrackpadRightClick = true; # enable two finger right click 8 + TrackpadThreeFingerDrag = false; # enable three finger drag, disabled so I can swap workspaces with 3 fingers 9 + }; 6 10 }; 7 11 }
+1 -11
modules/darwin/non-native.nix
··· 1 - {pkgs, ...}: { 1 + { 2 2 # Customize settings that not supported by nix-darwin directly 3 3 # see the source code of this project to get more undocumented options: 4 4 # https://github.com/rgcr/m-cli ··· 9 9 NSGlobalDomain = { 10 10 # Add a context menu item for showing the Web Inspector in web views 11 11 WebKitDeveloperExtras = true; 12 - }; 13 - 14 - "com.apple.finder" = { 15 - ShowExternalHardDrivesOnDesktop = true; 16 - ShowHardDrivesOnDesktop = true; 17 - ShowMountedServersOnDesktop = true; 18 - ShowRemovableMediaOnDesktop = true; 19 - _FXSortFoldersFirst = true; 20 - # When performing a search, search the current folder by default 21 - FXDefaultSearchScope = "SCcf"; 22 12 }; 23 13 24 14 "com.apple.desktopservices" = {
+17
modules/darwin/prefrences/clock.nix
··· 1 + { 2 + system.defaults = { 3 + NSGlobalDomain.AppleICUForce24HourTime = false; # use 12 hour time 4 + 5 + menuExtraClock = { 6 + Show24Hour = true; # show 12 hour clock 7 + IsAnalog = false; # show digital clock 8 + ShowAMPM = true; # show AM/PM 9 + 10 + # Show date can imply the result of ShowDayOfMonth, ShowDayOfWeek, and ShowSeconds. 11 + ShowDate = 2; # 0 = Show the date 1 = Don’t show 2 = Don’t show (hides date) 12 + # ShowDayOfMonth = false; # show day of month 13 + # ShowDayOfWeek = false; # show day of week 14 + # ShowSeconds = false; # show seconds 15 + }; 16 + }; 17 + }
+13
modules/darwin/prefrences/default.nix
··· 1 + # All the configuration options are documented here: https://daiderd.com/nix-darwin/manual/index.html#sec-options 2 + # Incomplete list of macOS `defaults` commands: https://macos-defaults.com/ 3 + { 4 + imports = [ 5 + ./clock.nix 6 + ./dock.nix 7 + ./finder.nix 8 + ./login.nix 9 + ./misc.nix 10 + ./sound.nix 11 + ./theme.nix 12 + ]; 13 + }
+21
modules/darwin/prefrences/dock.nix
··· 1 + { 2 + system.defaults.dock = { 3 + autohide = true; 4 + autohide-delay = 0.0; # autohide delay 5 + autohide-time-modifier = 1.0; # autohide animation duration 6 + 7 + orientation = "bottom"; # dock position 8 + tilesize = 1; # dock icon size 9 + 10 + static-only = false; # show running apps 11 + show-recents = false; # disable recent apps 12 + showhidden = false; # show hidden apps 13 + mru-spaces = false; # disable recent spaces 14 + 15 + # customize Hot Corners 16 + # wvous-tl-corner = 2; # top-left - Mission Control 17 + # wvous-tr-corner = 13; # top-right - Lock Screen 18 + # wvous-bl-corner = 3; # bottom-left - Application Windows 19 + # wvous-br-corner = 4; # bottom-right - Desktop 20 + }; 21 + }
+27
modules/darwin/prefrences/finder.nix
··· 1 + { 2 + system.defaults = { 3 + finder = { 4 + _FXShowPosixPathInTitle = true; # show full path in finder title 5 + # FXRemoveOldTrashItems = true; # remove items from trash after 30 days 6 + AppleShowAllExtensions = true; # show all file extensions 7 + AppleShowAllFiles = true; # show hidden files 8 + FXEnableExtensionChangeWarning = false; # disable warning when changing file extension 9 + QuitMenuItem = true; # hide the quit button on finder 10 + ShowPathbar = true; # show path bar 11 + ShowStatusBar = true; # show status bar 12 + 13 + # cusomize the desktop 14 + CreateDesktop = false; # disable icons on the desktop 15 + }; 16 + 17 + CustomUserPreferences."com.apple.finder" = { 18 + ShowExternalHardDrivesOnDesktop = true; 19 + ShowHardDrivesOnDesktop = true; 20 + ShowMountedServersOnDesktop = true; 21 + ShowRemovableMediaOnDesktop = true; 22 + _FXSortFoldersFirst = true; 23 + # When performing a search, search the current folder by default 24 + FXDefaultSearchScope = "SCcf"; 25 + }; 26 + }; 27 + }
+6
modules/darwin/prefrences/login.nix
··· 1 + { 2 + system.defaults.loginwindow = { 3 + GuestEnabled = false; # disable guest user 4 + SHOWFULLNAME = false; # show full name in login window 5 + }; 6 + }
+11
modules/darwin/prefrences/misc.nix
··· 1 + { 2 + system.defaults.NSGlobalDomain = { 3 + NSAutomaticCapitalizationEnabled = false; # disable auto capitalization 4 + NSAutomaticDashSubstitutionEnabled = false; # disable auto dash substitution 5 + NSAutomaticPeriodSubstitutionEnabled = false; # disable auto period substitution 6 + NSAutomaticQuoteSubstitutionEnabled = false; # disable auto quote substitution 7 + NSAutomaticSpellingCorrectionEnabled = false; # disable auto spelling correction 8 + NSNavPanelExpandedStateForSaveMode = true; # expand save panel by default 9 + NSNavPanelExpandedStateForSaveMode2 = true; # ^ 10 + }; 11 + }
+6
modules/darwin/prefrences/sound.nix
··· 1 + { 2 + system.defaults.NSGlobalDomain = { 3 + "com.apple.sound.beep.feedback" = 0; # disable beep sound when pressing volume up/down key 4 + "com.apple.sound.beep.volume" = null; # disable beep sound 5 + }; 6 + }
+3
modules/darwin/prefrences/theme.nix
··· 1 + { 2 + system.defaults.NSGlobalDomain.AppleInterfaceStyle = "Dark"; # dark mode 3 + }