| ... | @@ -6,7 +6,8 @@ | ... | @@ -6,7 +6,8 @@ |
| 6 | ... | 6 | ... |
| 7 | }: { | 7 | }: { |
| 8 | imports = [ | 8 | imports = [ |
| 9 | ./modules/icons.nix | 9 | # ../../modules/macos/icons.nix |
| | 10 | ../../modules/macos/homebrew.nix |
| 10 | ]; | 11 | ]; |
| 11 | | 12 | |
| 12 | environment.systemPackages = with pkgs; [ | 13 | environment.systemPackages = with pkgs; [ |
| ... | @@ -14,15 +15,15 @@ | ... | @@ -14,15 +15,15 @@ |
| 14 | pinentry_mac | 15 | pinentry_mac |
| 15 | ]; | 16 | ]; |
| 16 | | 17 | |
| 17 | environment.customIcons = { | 18 | # environment.customIcons = { |
| 18 | enable = true; | 19 | # enable = true; |
| 19 | icons = [ | 20 | # icons = [ |
| 20 | { | 21 | # { |
| 21 | path = "/Applications/Zen.app"; | 22 | # path = "/Applications/Zen.app"; |
| 22 | icon = "/Users/nmarks/.dotfiles/icons/Zen_icons/firefox.icns"; | 23 | # icon = "/Users/nmarks/.dotfiles/icons/Zen_icons/firefox.icns"; |
| 23 | } | 24 | # } |
| 24 | ]; | 25 | # ]; |
| 25 | }; | 26 | # }; |
| 26 | | 27 | |
| 27 | # Use a custom configuration.nix location. | 28 | # Use a custom configuration.nix location. |
| 28 | #environment.darwinConfig = "$HOME/.dotfiles/hosts/laptop"; | 29 | #environment.darwinConfig = "$HOME/.dotfiles/hosts/laptop"; |
| ... | @@ -43,52 +44,6 @@ | ... | @@ -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 | security.pam.services.sudo_local = { | 47 | security.pam.services.sudo_local = { |
| 93 | enable = true; | 48 | enable = true; |
| 94 | reattach = true; | 49 | reattach = true; |
| ... | @@ -96,39 +51,73 @@ | ... | @@ -96,39 +51,73 @@ |
| 96 | }; | 51 | }; |
| 97 | | 52 | |
| 98 | # set some OSX preferences that I always end up hunting down and changing. | 53 | # set some OSX preferences that I always end up hunting down and changing. |
| 99 | system.defaults = { | 54 | system = { |
| 100 | # minimal dock | 55 | # Used for backwards compatibility, please read the changelog before changing. |
| 101 | dock = { | 56 | # $ darwin-rebuild changelog |
| 102 | autohide = false; | 57 | stateVersion = 6; |
| 103 | show-process-indicators = true; | 58 | |
| 104 | show-recents = true; | 59 | defaults = { |
| 105 | static-only = true; | 60 | LaunchServices = { |
| 106 | }; | 61 | LSQuarantine = false; |
| 107 | # a finder that tells me what I want to know and lets me work | 62 | }; |
| 108 | finder = { | 63 | |
| 109 | AppleShowAllExtensions = true; | 64 | NSGlobalDomain = { |
| 110 | ShowPathbar = true; | 65 | AppleShowAllExtensions = true; |
| 111 | FXEnableExtensionChangeWarning = false; | 66 | ApplePressAndHoldEnabled = false; |
| 112 | }; | 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 = { | 95 | expose-group-apps = true; |
| 115 | launchd.user.agents.UserKeyMapping.serviceConfig = { | 96 | |
| 116 | ProgramArguments = [ | 97 | show-recents = true; |
| 117 | "/usr/bin/hidutil" | 98 | static-only = true; |
| 118 | "property" | 99 | |
| 119 | "--match" | 100 | mineffect = "scale"; |
| 120 | "{"ProductID":0x0,"VendorID":0x0,"Product":"Apple Internal Keyboard / Trackpad"}" | 101 | |
| 121 | "--set" | 102 | orientation = "bottom"; |
| 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; | | |
| 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 | } |