|
17 | 17 | community.general.homebrew_tap:
|
18 | 18 | name: [
|
19 | 19 | adoptopenjdk/openjdk,
|
20 |
| - fishtown-analytics/dbt, |
21 |
| - heroku/brew, |
22 | 20 | homebrew/cask-versions,
|
23 | 21 | thoughtbot/formulae,
|
24 | 22 | weaveworks/tap,
|
|
29 | 27 | name: "{{ item }}"
|
30 | 28 | ignore_errors: yes
|
31 | 29 | with_items:
|
32 |
| - - 1password |
33 |
| - - android-sdk |
34 |
| - - android-studio |
35 |
| - - datagrip |
| 30 | + # - datagrip |
36 | 31 | - docker
|
37 |
| - - dropbox |
38 |
| - - figma |
39 | 32 | - google-chrome
|
40 |
| - - google-cloud-sdk |
41 | 33 | - iterm2
|
42 |
| - - kindle |
43 |
| - - ngrok |
44 |
| - - slack |
45 | 34 | - sublime-text
|
46 | 35 | - telegram
|
47 | 36 | - visual-studio-code
|
48 | 37 | - vlc
|
49 |
| - - zoom |
50 |
| - - tuple |
51 | 38 |
|
52 | 39 | - name: "Install homebrew packages"
|
53 | 40 | community.general.homebrew:
|
54 | 41 | name: [
|
55 | 42 | 'autoconf',
|
56 | 43 | 'automake',
|
57 |
| - 'aws-iam-authenticator', |
58 | 44 | 'awscli',
|
| 45 | + 'atuin', |
59 | 46 | 'bfg',
|
60 | 47 | 'coreutils',
|
61 | 48 | 'curl',
|
62 |
| - |
63 | 49 | 'direnv',
|
64 | 50 | 'dnsmasq',
|
65 | 51 | 'fzf',
|
66 | 52 | 'gnu-time',
|
67 |
| - 'gpg', |
68 |
| - 'heroku', |
| 53 | + 'gh', |
69 | 54 | 'htop',
|
70 |
| - 'imagemagick@6', |
71 |
| - 'kubectx', |
72 |
| - 'kubernetes-cli', |
73 |
| - 'kubernetes-helm', |
74 | 55 | 'libtool',
|
75 | 56 | 'libxslt',
|
76 | 57 | 'libyaml',
|
77 |
| - 'mas', |
78 | 58 | 'openssl' ,
|
79 |
| - 'pkg-config', |
80 |
| - 'postgresql', |
81 |
| - 'rcm', |
82 | 59 | 'readline',
|
83 |
| - 'redis', |
84 |
| - 'sqlite3', |
85 |
| - 'tmux', |
86 |
| - 'unixodbc', |
87 | 60 | 'unzip',
|
88 |
| - 'vim', |
89 |
| - 'watchman', |
90 |
| - 'xz', |
91 |
| - 'yarn', |
92 | 61 | 'zlib',
|
93 | 62 | 'zsh',
|
| 63 | + 'pipx', |
| 64 | + 'tldr' |
94 | 65 | ]
|
95 | 66 | state: present
|
96 | 67 | update_homebrew: yes
|
97 | 68 |
|
98 |
| - - name: "Install from Mac app store" |
99 |
| - shell: mas install {{ item }} |
100 |
| - with_items: |
101 |
| - - 497799835 # xcode |
102 | 69 |
|
103 | 70 | - name: Get the path to ZSH
|
104 | 71 | become: false
|
|
139 | 106 | src: templates/vscode-keybindings.json.j2
|
140 | 107 | dest: /Users/{{ lookup('env', 'USER') }}/Library/Application Support/Code/User/keybindings.json
|
141 | 108 | owner: "{{ lookup('env', 'USER') }}"
|
142 |
| - force: yes |
143 |
| - |
144 |
| - # Add something which ensures path is set here |
145 |
| - - name: Install VSCode extensions |
146 |
| - shell: code --install-extension {{ item }} |
147 |
| - with_items: |
148 |
| - - apollographql.vscode-apollo |
149 |
| - - bradlc.vscode-tailwindcss |
150 |
| - - castwide.solargraph |
151 |
| - - clinyong.vscode-css-modules |
152 |
| - - eamodio.gitlens |
153 |
| - - jakebecker.elixir-ls |
154 |
| - - kaiwood.endwise |
155 |
| - - karunamurti.haml |
156 |
| - - ms-vscode-remote.vscode-remote-extensionpack |
157 |
| - - ms-vscode.vscode-typescript-tslint-plugin |
158 |
| - - msjsdiag.debugger-for-chrome |
159 |
| - - rebornix.ruby |
160 |
| - - richie5um2.vscode-sort-json |
161 |
| - - Tyriar.sort-lines |
162 |
| - - vscodevim.vim |
163 |
| - - wholroyd.jinja |
164 |
| - - wingrunr21.vscode-ruby |
165 |
| - - xabikos.javascriptsnippets |
166 |
| - - streetsidesoftware.code-spell-checker |
167 |
| - - fabiospampinato.vscode-todo-plus |
| 109 | + force: yes |
168 | 110 |
|
169 | 111 | - git:
|
170 | 112 | repo: https://github.com/asdf-vm/asdf.git
|
171 | 113 | dest: "/Users/{{ lookup('env', 'USER') }}/.asdf"
|
172 |
| - version: v0.8.1 |
| 114 | + version: v0.14.0 |
173 | 115 |
|
174 | 116 | - name: "Create a default asdf configuration"
|
175 | 117 | template:
|
|
183 | 125 | source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
184 | 126 | asdf plugin-add {{ item }} || exit 0
|
185 | 127 | with_items:
|
186 |
| - - ruby |
187 |
| - - elixir |
188 |
| - - nodejs |
189 | 128 | - python
|
190 |
| - - erlang |
191 | 129 |
|
192 | 130 | - name: "Install Default Python"
|
193 | 131 | shell: |
|
194 | 132 | source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh
|
195 |
| - asdf install python 3.10.0 |
196 |
| - asdf global python 3.10.0 |
| 133 | + asdf install python 3.12.2 |
| 134 | + asdf global python 3.12.2 |
197 | 135 | pip3 install ansible
|
198 | 136 | asdf reshim python
|
199 |
| -
|
200 |
| - - name: "Install Default Ruby" |
201 |
| - shell: | |
202 |
| - source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh |
203 |
| - asdf install ruby 3.0.2 |
204 |
| - asdf global ruby 3.0.2 |
205 |
| - gem install bundler |
206 |
| - gem install cocoapods |
207 |
| - gem install rubocop |
208 |
| - gem install solargraph |
209 |
| -
|
210 |
| - - name: "Install default node" |
211 |
| - shell: | |
212 |
| - source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh |
213 |
| - bash /Users/{{ lookup('env', 'USER') }}/.asdf/plugins/nodejs/bin/import-release-team-keyring |
214 |
| - asdf install nodejs 16.4.2 |
215 |
| - asdf global nodejs 16.4.2 |
216 |
| -
|
217 |
| - - name: "Install default erlang" |
| 137 | + |
| 138 | + - name: "Setup pipx and venv and atuin" |
218 | 139 | shell: |
|
219 |
| - source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh |
220 |
| - asdf install erlang 24.0.2 |
221 |
| - asdf global erlang 24.0.2 |
222 |
| -
|
223 |
| -
|
224 |
| - - name: "Install default elixir" |
| 140 | + echo "alias pip=pipx" >> /Users/{{ lookup('env', 'USER') }}/.zshrc |
| 141 | + echo 'eval "$(atuin init zsh)"' >> /Users/{{ lookup('env', 'USER') }}/.zshrc |
| 142 | + pipx ensurepath |
| 143 | + source /Users/{{ lookup('env', 'USER') }}/.zshrc |
| 144 | + pip install virtualenv |
| 145 | + mkdir /Users/{{ lookup('env', 'USER') }}/venv |
| 146 | +
|
| 147 | + - name: Add venv() function to zshrc |
| 148 | + blockinfile: |
| 149 | + path: "/Users/{{ lookup('env', 'USER') }}/.zshrc" |
| 150 | + block: | |
| 151 | + venv() { |
| 152 | + local env_name="$1" |
| 153 | + local venv_path="$HOME/venv/$env_name" |
| 154 | +
|
| 155 | + if [ -d "$venv_path" ]; then |
| 156 | + # If the virtual environment exists, activate it |
| 157 | + source "$venv_path/bin/activate" |
| 158 | + else |
| 159 | + # If the virtual environment doesn't exist, create it and activate it |
| 160 | + virtualenv "$venv_path" |
| 161 | + source "$venv_path/bin/activate" |
| 162 | + fi |
| 163 | + } |
| 164 | + |
| 165 | + - name: Create ssh key for github |
225 | 166 | shell: |
|
226 |
| - source /Users/{{ lookup('env', 'USER') }}/.asdf/asdf.sh |
227 |
| - asdf install elixir 1.12.3-otp-24 |
228 |
| - asdf global elixir 1.12.3-otp-24 |
229 |
| - mix local.hex --force |
230 |
| -
|
231 |
| - - name: Install yarn packages |
232 |
| - shell: yarn global add {{ item }} |
233 |
| - with_items: |
234 |
| - - react-native-cli |
235 |
| - - create-react-app |
236 |
| - - apollo |
237 |
| - - generator-generator |
238 |
| - - yo |
239 |
| - |
240 |
| - - name: re-generate bins now we've installed some yarn packages |
241 |
| - shell: asdf reshim nodejs |
| 167 | + mkdir /Users/{{ lookup('env', 'USER') }}/.ssh |
| 168 | + touch /Users/{{ lookup('env', 'USER') }}/.ssh/config |
| 169 | + # DO THE FOLLOWING |
| 170 | + # cd ~/.ssh |
| 171 | + # ssh-keygen -t ed25519 -C "[email protected]" |
| 172 | + # ssh-add --apple-use-keychain ~/.ssh/github |
| 173 | + # pbcopy < ~/.ssh/github.pub |
| 174 | + # copy the ssh key to github->settings->ssh keys |
| 175 | +
|
| 176 | + |
242 | 177 |
|
243 | 178 |
|
0 commit comments