| ... | ... | @@ -6,7 +6,8 @@ |
| 6 | 6 | ... |
| 7 | 7 | }: { |
| 8 | 8 | imports = [ |
| 9 | | ./modules/icons.nix |
| 9 | # ../../modules/macos/icons.nix |
| 10 | ../../modules/macos/homebrew.nix |
| 10 | 11 | ]; |
| 11 | 12 | |
| 12 | 13 | environment.systemPackages = with pkgs; [ |
| ... | ... | @@ -14,15 +15,15 @@ |
| 14 | 15 | pinentry_mac |
| 15 | 16 | ]; |
| 16 | 17 | |
| 17 | | environment.customIcons = { |
| 18 | | enable = true; |
| 19 | | icons = [ |
| 20 | | { |
| 21 | | path = "/Applications/Zen.app"; |
| 22 | | icon = "/Users/nmarks/.dotfiles/icons/Zen_icons/firefox.icns"; |
| 23 | | } |
| 24 | | ]; |
| 25 | | }; |
| 18 | # environment.customIcons = { |
| 19 | # enable = true; |
| 20 | # icons = [ |
| 21 | # { |
| 22 | # path = "/Applications/Zen.app"; |
| 23 | # icon = "/Users/nmarks/.dotfiles/icons/Zen_icons/firefox.icns"; |
| 24 | # } |
| 25 | # ]; |
| 26 | # }; |
| 26 | 27 | |
| 27 | 28 | # Use a custom configuration.nix location. |
| 28 | 29 | #environment.darwinConfig = "$HOME/.dotfiles/hosts/laptop"; |
| ... | ... | @@ -43,52 +44,6 @@ |
| 43 | 44 | ''; |
| 44 | 45 | }; |
| 45 | 46 | |
| 46 | | # Used for backwards compatibility, please read the changelog before changing. |
| 47 | | # $ darwin-rebuild changelog |
| 48 | | system.stateVersion = 6; |
| 49 | | |
| 50 | | # Install fonts |
| 51 | | fonts.packages = [ |
| 52 | | pkgs.iosevka |
| 53 | | pkgs.nerd-fonts.symbols-only |
| 54 | | pkgs.nerd-fonts.iosevka |
| 55 | | ]; |
| 56 | | |
| 57 | | services.tailscale.enable = true; |
| 58 | | |
| 59 | | # Use homebrew to install casks and Mac App Store apps |
| 60 | | homebrew = { |
| 61 | | enable = true; |
| 62 | | |
| 63 | | onActivation = { |
| 64 | | autoUpdate = true; |
| 65 | | cleanup = "none"; |
| 66 | | upgrade = true; |
| 67 | | }; |
| 68 | | |
| 69 | | # taps = [ |
| 70 | | # "legcord/legcord" |
| 71 | | # ]; |
| 72 | | |
| 73 | | brews = [ |
| 74 | | "imagemagick" |
| 75 | | "opam" |
| 76 | | ]; |
| 77 | | |
| 78 | | casks = [ |
| 79 | | "battle-net" |
| 80 | | "stremio" |
| 81 | | "alt-tab" |
| 82 | | "legcord" |
| 83 | | "zulip" |
| 84 | | "zen-browser" |
| 85 | | ]; |
| 86 | | |
| 87 | | masApps = { |
| 88 | | "wireguard" = 1451685025; |
| 89 | | }; |
| 90 | | }; |
| 91 | | |
| 92 | 47 | security.pam.services.sudo_local = { |
| 93 | 48 | enable = true; |
| 94 | 49 | reattach = true; |
| ... | ... | @@ -96,39 +51,73 @@ |
| 96 | 51 | }; |
| 97 | 52 | |
| 98 | 53 | # set some OSX preferences that I always end up hunting down and changing. |
| 99 | | system.defaults = { |
| 100 | | # minimal dock |
| 101 | | dock = { |
| 102 | | autohide = false; |
| 103 | | show-process-indicators = true; |
| 104 | | show-recents = true; |
| 105 | | static-only = true; |
| 106 | | }; |
| 107 | | # a finder that tells me what I want to know and lets me work |
| 108 | | finder = { |
| 109 | | AppleShowAllExtensions = true; |
| 110 | | ShowPathbar = true; |
| 111 | | FXEnableExtensionChangeWarning = false; |
| 112 | | }; |
| 54 | system = { |
| 55 | # Used for backwards compatibility, please read the changelog before changing. |
| 56 | # $ darwin-rebuild changelog |
| 57 | stateVersion = 6; |
| 58 | |
| 59 | defaults = { |
| 60 | LaunchServices = { |
| 61 | LSQuarantine = false; |
| 62 | }; |
| 63 | |
| 64 | NSGlobalDomain = { |
| 65 | AppleShowAllExtensions = true; |
| 66 | ApplePressAndHoldEnabled = false; |
| 67 | |
| 68 | # 120, 90, 60, 30, 12, 6, 2 |
| 69 | KeyRepeat = 2; |
| 70 | |
| 71 | # 120, 94, 68, 35, 25, 15 |
| 72 | InitialKeyRepeat = 15; |
| 73 | |
| 74 | "com.apple.mouse.tapBehavior" = 1; |
| 75 | "com.apple.sound.beep.volume" = 0.0; |
| 76 | "com.apple.sound.beep.feedback" = 0; |
| 77 | |
| 78 | #Ew. |
| 79 | NSAutomaticCapitalizationEnabled = false; |
| 80 | NSAutomaticDashSubstitutionEnabled = false; |
| 81 | NSAutomaticInlinePredictionEnabled = false; |
| 82 | NSAutomaticPeriodSubstitutionEnabled = false; |
| 83 | NSAutomaticQuoteSubstitutionEnabled = false; |
| 84 | NSAutomaticSpellingCorrectionEnabled = false; |
| 85 | NSDisableAutomaticTermination = true; |
| 86 | NSDocumentSaveNewDocumentsToCloud = false; |
| 87 | AppleICUForce24HourTime = true; |
| 88 | }; |
| 89 | # minimal dock |
| 90 | dock = { |
| 91 | autohide = true; |
| 92 | autohide-time-modifier = 0; |
| 93 | show-process-indicators = true; |
| 113 | 94 | |
| 114 | | CustomUserPreferences = { |
| 115 | | launchd.user.agents.UserKeyMapping.serviceConfig = { |
| 116 | | ProgramArguments = [ |
| 117 | | "/usr/bin/hidutil" |
| 118 | | "property" |
| 119 | | "--match" |
| 120 | | "{"ProductID":0x0,"VendorID":0x0,"Product":"Apple Internal Keyboard / Trackpad"}" |
| 121 | | "--set" |
| 122 | | ( |
| 123 | | let |
| 124 | | # https://developer.apple.com/library/archive/technotes/tn2450/_index.html |
| 125 | | caps_lock = "0x700000039"; |
| 126 | | escape = "0x700000029"; |
| 127 | | in "{"UserKeyMapping":[{"HIDKeyboardModifierMappingDst":${escape},"HIDKeyboardModifierMappingSrc":${caps_lock}},{"HIDKeyboardModifierMappingDst":${caps_lock},"HIDKeyboardModifierMappingSrc":${escape}}]}" |
| 128 | | ) |
| 129 | | ]; |
| 130 | | RunAtLoad = true; |
| 95 | expose-group-apps = true; |
| 96 | |
| 97 | show-recents = true; |
| 98 | static-only = true; |
| 99 | |
| 100 | mineffect = "scale"; |
| 101 | |
| 102 | orientation = "bottom"; |
| 131 | 103 | }; |
| 104 | # a finder that tells me what I want to know and lets me work |
| 105 | finder = { |
| 106 | _FXShowPosixPathInTitle = true; |
| 107 | FXDefaultSearchScope = "SCcf"; |
| 108 | AppleShowAllExtensions = true; |
| 109 | ShowPathbar = true; |
| 110 | FXEnableExtensionChangeWarning = false; |
| 111 | }; |
| 112 | CustomSystemPreferences = { |
| 113 | "com.apple.universalaccess" = { |
| 114 | closeViewTrackpadGestureZoomEnabled = 1; |
| 115 | }; |
| 116 | }; |
| 117 | }; |
| 118 | keyboard = { |
| 119 | enableKeyMapping = true; |
| 120 | remapCapsLockToEscape = true; |
| 132 | 121 | }; |
| 133 | 122 | }; |
| 134 | 123 | } |