-
Notifications
You must be signed in to change notification settings - Fork 7
/
run_once_before_install-packages-darwin.sh.tmpl
98 lines (83 loc) · 3.15 KB
/
run_once_before_install-packages-darwin.sh.tmpl
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
{{- if eq .chezmoi.os "darwin" -}}
#!/usr/bin/env bash
# Hide "last login" line when starting a new terminal session
touch "$HOME/.hushlogin"
echo 'Check for Homebrew and install if we don''t have it'
echo '----------------'
if ! command -v brew &>/dev/null; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
eval "$($HOMEBREW_PREFIX/bin/brew shellenv)"
else
brew update
fi
echo 'Install brew packages'
echo '------------'
brew tap homebrew/bundle
brew bundle --no-lock --file="{{ .chezmoi.sourceDir }}/Brewfile"
brew link --force libpq
echo 'Install Apps from AppStore'
echo '------------'
mas install 937984704 # Amphetamine
mas install 904280696 # Things
mas install 360593530 # Notability
mas install 1435055351 # PDFify
mas install -2142946629 # RedisInsight
mas install 1090488118 # Gemini 2
mas install 1529448980 # Reeder 5
mas install 1291898086 # Toggl
mas install 1099568401 # Home Assistant
mas install 1534275760 # LanguageTool
mas install 1193539993 # Brother iPrint&Scan
mas install 411643860 # DaisyDisk
mas install 1436522307 # Transmit 5
mas install 1451685025 # WireGuard
mas install 1295203466 # Microsoft Remote Desktop
mas install 747648890 # Telegram
echo 'Install oh-my-zsh'
echo '-----------------'
if [ ! -d "$HOME/.oh-my-zsh" ]; then
/bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/HEAD/tools/install.sh)"
chsh -s "$(which zsh)"
fi
echo 'Installing zsh plugins'
echo '------------'
ZSH_CUSTOM="$HOME/.oh-my-zsh/custom"
mkdir -p "$ZSH_CUSTOM/plugins"
git clone https://github.com/jessarcher/zsh-artisan.git ~/.oh-my-zsh/custom/plugins/artisan
echo 'Finalize fzf install'
echo '------------'
"$(brew --prefix)/opt/fzf/install" --all --no-update-rc
echo 'Initiate pre-commit.'
echo '------------'
if [ -d "~/git-template" ]; then
echo -e "\033[33mThe folder '{{ .chezmoi.sourceDir }}/git-template' already exists.\033[0m"^
else
pre-commit init-templatedir ~/.git-template
fi
echo 'Install node version manager (nvm)'
echo '-----------'
if [ ! -d "$NVM_DIR" ]; then
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install 14 --no-progress
nvm install 16 --no-progress
nvm install 18 --no-progress
nvm alias default 18
fi
# echo 'Install php environment'
# echo '---------------------------'
# sh "$(chezmoi source-path)/install/php-env.sh"
echo 'Install gh extensions'
echo '---------------------------'
gh extension install github/gh-copilot
gh extension install dlvhdr/gh-dash
echo '++++++++++++++++++++++++++++++'
echo 'All done!'
echo 'Things to do to make the agnoster terminal theme work:'
echo '1. Install patched solarized theme included in '"'"'$(chezmoi source-path)/misc/iTerm Profile.json'"'"''
echo '2. Allow sudo permittance with fingerprint. Further instructions in '"'"'$(chezmoi source-path)/misc/fingerprint.sh'"'"''
echo '3. Set default mac settings by running source '"'"'$(chezmoi source-path)/macos/set-defaults.sh'"'"''
echo '++++++++++++++++++++++++++++++'
{{- end -}}