-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·129 lines (98 loc) · 3.7 KB
/
install.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
#!/bin/bash
echo "Setting up your Mac..."
if [ "$TERM_PROGRAM" != "Apple_Terminal" ]; then
echo "Error: This script must be run in Apple Terminal. Mac OS doesn't grant other terminals (eg iTerm) the same access."
echo "If you're sure you want to continu, set the TERM_PROGRAM envvar to 'Apple_Terminal'"
exit 1
fi
mkdir -p ~/.ssh/control
chmod 700 ~/.ssh
ln -s $HOME/.dotfiles/.ssh_config $HOME/.ssh/config
# Check for Homebrew and install if we don't have it
if test ! $(which brew); then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >>/Users/$USER/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
git clone [email protected]:franklouwers/dotfiles-pvt.git $HOME/.dotfiles-pvt
# We use submodules in this repo...
# no we don't ...
#git submodule init
#git submodule update
# Update Homebrew recipes
brew update
# Rosetta: some of our Brew installs require it
sudo softwareupdate --install-rosetta
# Install all our dependencies with bundle (See Brewfile)
brew tap homebrew/bundle
brew bundle
# zsh files from here...
ln -s $HOME/.dotfiles/.zshrc $HOME/
ln -s $HOME/.dotfiles/.zsh $HOME/
# git config
ln -s $HOME/.dotfiles/.gitconfig $HOME/
# Neovim files from repo
mkdir -p $HOME/.config
git clone [email protected]:franklouwers/neovim-config.git $HOME/.config/nvim
# p10k config
ln -s $HOME/.dotfiles/p10k.zsh $HOME/.p10k.zsh
# Ghostty config
ln -s $HOME/.dotfiles/ghostty $HOME/.config/
### Install asdf plugins
#. $(brew --prefix)/opt/asdf/libexec/asdf.sh
## Golang
#asdf plugin-add golang https://github.com/kennyp/asdf-golang.git
# after go getting: asdf reshim golang
#asdf install golang latest
#asdf global golang $(asdf list golang)
#. $(brew --prefix)/opt/asdf/libexec/asdf.sh
#go install golang.org/x/tools/cmd/goimports@latest
#go install golang.org/x/tools/gopls@latest
## NodeJS
#asdf plugin-add nodejs https://github.com/asdf-vm/asdf-nodejs.git
#bash -c '${ASDF_DATA_DIR:=$HOME/.asdf}/plugins/nodejs/bin/import-release-team-keyring'
#asdf install nodejs lts
#asdf global nodejs lts
#asdf install nodejs 20.17.0
#asdf global nodejs 20.17.0
#. $(brew --prefix)/opt/asdf/libexec/asdf.sh
## Ruby
#asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
#asdf install ruby latest
#asdf global ruby $(asdf list ruby)
#. $(brew --prefix)/opt/asdf/libexec/asdf.sh
# Install global ruby packages
gem install yaml2json
gem install solargraph
gem install ruby-lsp
## Symlink the Mackup config file to the home directory
ln -s $HOME/.dotfiles/.mackup.cfg $HOME/.mackup.cfg # do we still use this? TODO
# vim lsp
npm install --global dockerfile-language-server-nodejs # dockerfile
npm install --global yarn
npm install --global @funboxteam/optimizt # optmize images for the web ### TODO: fix me
npm install -g yaml-language-server # yamlls
npm install -g bash-language-server # yamlls
npm install -g https://github.com/lttb/gh-actions-language-server # standalone github actions LSP
npm install -g bun # like all the cool kidz in town do
open -a Dropbox
# requires rosetta!
## Helm
#asdf plugin-add helm
#asdf install helm latest
#ssh-add --apple-use-keychain ~/.ssh/id_*
# new style auth plugin for gcloud
gcloud components install gke-gcloud-auth-plugin
mkdir -p $HOME/bin
cp -a bin/* $HOME/bin
mkdir -p $HOME/.config/swiftbar
cp ipv6-toggle.1s.sh $HOME/.config/swiftbar
### mark-text isn't properly signed
# needed as long as https://github.com/marktext/marktext/issues/2983 is open
#xattr -r -d com.apple.quarantine /Applications/MarkText.app
# Set macOS preferences
# We will run this last because this will reload the shell
source macos-settings.sh
echo ''
echo "may the force be with you!"
echo "Also check $HOME/.dotfiles-pvt"