forked from ThibDujardin/auto-install-osx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
osx_bootstrap.sh
167 lines (142 loc) · 3.17 KB
/
osx_bootstrap.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#!/bin/bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times
echo "Starting bootstrapping"
# Check for Homebrew, install if we don't have it
if test ! $(which brew); then
echo "Installing homebrew..."
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
echo "Installing Oh-my-zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended &>/dev/null
# Update homebrew recipes
brew update
# Install GNU core utilities (those that come with OS X are outdated)
brew install coreutils
brew install gnu-sed
brew install gnu-tar
brew install gnu-indent
brew install gnu-which
# Install GNU core utilities (those that come with OS X are outdated)
brew install findutils
PACKAGES=(
ack
act
adr-tools
autoconf
autojump
automake
asdf
awscli
azure-cli
ca-certificates
colima
dive
docker
docker-compose
ffmpeg
fluxctl
gettext
gifsicle
git
gh
go
graphviz
helm
hey
highlight
hub
hugo
hyperkit
imagemagick
jmeter
jq
k9s
kcat
kubectx
kustomize
mveritym/homebrew-mel/kubedecode
kubernetes-cli
kube-ps1
kubedecode
lens
libjpeg
libmemcached
markdown
maven
memcached
minikube
npm
node
nvm
pkg-config
powerlevel10k
rename
shellcheck
ssh-copy-id
terminal-notifier
the_silver_searcher
tree
wget
watch
)
echo "Installing packages..."
brew install ${PACKAGES[@]}
echo "Cleaning up..."
brew cleanup
echo "Installing cask..."
brew install caskroom/cask/brew-cask
CASKS=(
alfred
flux
#google-chrome
google-cloud-sdk
gpg-suite
iterm2
menumeters
notion
raycast
rambox
slack
signal
spotify
vlc
lastpass
jetbrains-toolbox
insomnia
firefox
)
echo "Installing cask apps..."
brew install --cask ${CASKS[@]}
echo "Installing Ruby gems"
RUBY_GEMS=(
bundler
filewatcher
cocoapods
)
sudo gem install ${RUBY_GEMS[@]}
echo "Installing global npm packages..."
npm install marked -g
echo "Configuring OSX..."
# Set fast key repeat rate
#defaults write NSGlobalDomain KeyRepeat -int 0
# Require password as soon as screensaver or sleep mode starts
defaults write com.apple.screensaver askForPassword -int 1
defaults write com.apple.screensaver askForPasswordDelay -int 0
# Show filename extensions by default
defaults write NSGlobalDomain AppleShowAllExtensions -bool true
# Enable tap-to-click
#defaults write com.apple.driver.AppleBluetoothMultitouch.trackpad Clicking -bool true
#defaults -currentHost write NSGlobalDomain com.apple.mouse.tapBehavior -int 1
# Remove mouse acceleration
defaults write .GlobalPreferences com.apple.mouse.scaling -1
# Enable "natural" scroll
# defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true
echo "Creating folder structure..."
[[ ! -d Workspace ]] && mkdir Workspace
[[ ! -d GitHub ]] && mkdir GitHub
echo "generate SSH KEY"
ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa -q -N ""
echo "Bootstrapping complete"