-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathansible-laptop.yml
740 lines (584 loc) · 17.8 KB
/
ansible-laptop.yml
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
---
# to apply (alias defined in .bashrc): $ apply-ansible
#
# help for snaps: https://docs.ansible.com/ansible/latest/modules/snap_module.html
# as root
- hosts: localhost
become: yes
tasks:
- name: glances, htop-like
apt:
name: glances
- name: meld, for merging conflicts
apt:
name: meld
- name: git (latest version)
apt_repository:
repo: ppa:git-core/ppa
- name: git
apt:
update_cache: yes
name: git
- name: gdu ppa (du/ncdu alternative)
apt_repository:
repo: ppa:daniel-milde/gdu
codename: focal # groovy (20.10) is not yet supported
- name: gdu (du/ncdu alternative)
apt:
update_cache: yes
name: gdu
- name: emacs repo
apt_repository:
repo: ppa:kelleyk/emacs
codename: focal # groovy (20.10) is not yet supported
- name: emacs
apt:
update_cache: yes
name: emacs27
- name: cloc, counts lines of code by language
apt:
name: cloc
- name: simplescreenrecorder
apt:
name: simplescreenrecorder
- name: peek (also a screen recorder)
apt:
name: peek
- name: screenkey (displays pressed buttons on screen)
apt:
name: screenkey
- name: bruno (http client à la Postman)
snap:
name: bruno
- name: gron (makes json greppable)
snap:
name: gron
- name: yq (parse yaml)
snap:
name: yq
- name: spotify
snap:
name: spotify
- name: vlc (video player)
snap:
name: vlc
- name: shellcheck
snap:
name: shellcheck
channel: edge
- name: ripgrep
snap:
name: ripgrep
classic: yes
- name: slack
snap:
name: slack
classic: yes
- name: btop (htop alternative)
snap:
name: btop
- name: vale (writing helper for prose)
snap:
name: vale
- name: cheese (record photo/video with webcam)
apt:
name: cheese
- name: w3m (terminal web browser & pager)
apt:
name: w3m
- name: w3m-img (image viewer for w3m, including w3mimgdisplay)
apt:
name: w3m-img
- name: copyq (clipboard manager)
apt:
name: copyq
- name: jhead (exif extraction from photos)
apt:
name: jhead
- name: pavucontrol (ubuntu sucks at choosing output device when headset/bluetooth devices are connected, this is the solution)
apt:
name: pavucontrol
- name: yad (dialogs in GTK launched through CLI, like zenity)
apt:
name: yad
- name: font awesome
apt:
name: fonts-font-awesome
- name: entr (execute command when files change)
apt:
name: entr
- name: playerctl (media player, lets i3blocks query spotify for current song)
apt:
name: playerctl
- name: jq (parse json, mostly a dep, I use gron more often)
apt:
name: jq
- name: Deps for dunstify, see https://github.com/dunst-project/dunst/wiki/Dependencies
apt:
pkg:
- libdbus-1-dev
- libx11-dev
- libxinerama-dev
- libxrandr-dev
- libxss-dev
- libglib2.0-dev
- libpango1.0-dev
- libgtk-3-dev
- libxdg-basedir-dev
- libnotify-dev
- name: surfraw (shortcut for searching a bunch of search engines)
apt:
name: surfraw
- name: arandr (gui for xrandr, manage monitors & output)
apt:
name: arandr
- name: autorandr (udev rules + small cli config for detecting monitors being attached/detached)
apt:
name: autorandr
- name: brightnessctl (brightness via cli)
apt:
name: brightnessctl
- name: add myself to the video group (for brightnessctl without sudo)
user:
name: ch
groups: video
append: yes
- name: sqlitebrowser
apt:
name: sqlitebrowser
- name: pv (progress bar for pipes)
apt:
name: pv
- name: i3
apt:
name: i3
- name: i3blocks
apt:
name: i3blocks
- name: htop
apt:
name: htop
- name: xcape (bind keys, depending on time pressed)
apt:
name: xcape
- name: rofi (dmenu like autocompleting menu GUI thing)
apt:
name: rofi
- name: flameshot (screenshot)
apt:
name: flameshot
- name: xclip (clipboard)
apt:
name: xclip
- name: xsel (clipboard)
apt:
name: xsel
- name: espanso (global text expansion)
apt:
deb: https://github.com/federico-terzi/espanso/releases/download/v2.2.1/espanso-debian-x11-amd64.deb
# begin docker
- name: docker pre-reqs
apt:
pkg:
- apt-transport-https
- ca-certificates
- curl
- gnupg
- lsb-release
- name: docker gpg key
apt_key:
url: https://download.docker.com/linux/ubuntu/gpg
- name: docker repo
apt_repository:
repo: deb https://download.docker.com/linux/ubuntu groovy stable
- name: docker packages
apt:
update_cache: yes
pkg:
- docker-ce
- docker-ce-cli
- containerd.io
- docker-compose
- name: add myself to the docker group
user:
name: ch
groups: docker
append: yes
# end docker
# begin gh (github cli)
- name: github gpg key
apt_key:
url: https://cli.github.com/packages/githubcli-archive-keyring.gpg
- name: github apt repo
apt_repository:
repo: deb [arch=amd64] https://cli.github.com/packages stable main
- name: gh (github cli)
apt:
update_cache: yes
pkg:
- gh
# end gh
# begin element (matrix chat client)
- name: element gpg key
apt_key:
keyring: /usr/share/keyrings/element-io-archive-keyring.gpg
url: https://packages.element.io/debian/element-io-archive-keyring.gpg
- name: element apt repo
apt_repository:
repo: deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] https://packages.element.io/debian/ default main
- name: element (matrix chat client)
apt:
update_cache: yes
pkg:
- element-desktop
# end element
- name: xdotool (api for X, kinda)
apt:
name: xdotool
- name: nodejs
apt:
name: nodejs
- name: check mmdc version
command: mmdc --version
register: mmdc_version
- name: mmdc (mermaid cli (drawing diagrams))
when: mmdc_version.rc != 0
shell: npm install -g @mermaid-js/mermaid-cli
- name: sqlite3
apt:
name: sqlite3
- name: node-gyp (enables bindings for nodejs)
when: "'eta' in inventory_hostname"
apt:
name: node-gyp
- name: java
apt:
pkg:
- openjdk-11-jre # java
- openjdk-11-jdk-headless # for `jps`
- name: psql etc
when: "'eta' in inventory_hostname"
apt:
name: postgresql-client-12
- name: gimp (photoshopping)
apt:
name: gimp
- name: inkscape (illustrator, vector)
apt:
name: inkscape
- name: tree
apt:
name: tree
- name: libreoffice
apt:
name: libreoffice
- name: php-cli (for the datedate script in my dotfiles/bin)
apt:
name: php-cli
- name: redshift (night screen)
apt:
name: redshift
- name: figlet (large text in terminals, good for WARNING TEXTS etc)
apt:
name: figlet
- name: wmctrl (manage x windows through cli)
apt:
name: wmctrl
- name: tidy (formats html/xml, used when exporting org mode to html)
apt:
name: tidy
- name: amqp-tools (amqp-publish etc that lets you publish to rabbitmq)
when: "'eta' in inventory_hostname"
apt:
name: amqp-tools
- name: ncdu (interactive & visual alternative to du)
apt:
name: ncdu
- name: postgresql-devel (needed for pgcli)
apt:
name: libpq-dev
- name: nmap
apt:
name: nmap
- name: pandoc & markdown-to-pdf (yes, my cv is so original)
apt:
pkg:
- pandoc
- texlive-latex-recommended
- name: graphviz (dot et al.)
apt:
name: graphviz
- name: cargo (rust package manager)
apt:
name: cargo
- name: caffeine (keep the display/system alive and non-idle)
apt:
name: caffeine
- name: zsh
apt:
name: zsh
- name: visidata (csv tui)
apt:
name: visidata
- name: keyutils (for keyctl, needed in bwmenu (bitwarden cli for rofi))
apt:
name: keyutils
- name: asciinema for recording terminal interactions
apt:
name: asciinema
- name: Deps for jless, see https://github.com/PaulJuliusMartinez/jless
apt:
pkg:
- libxcb1-dev
- libxcb-render0-dev
- libxcb-shape0-dev
- libxcb-xfixes0-dev
- hosts: localhost
# requires $ ansible-galaxy install staticdev.signal
roles:
- role: staticdev.signal
# as user
- hosts: localhost
tasks:
- name: litecli (sqlite alternative cli)
pip:
name: litecli
extra_args: --user
- name: orgparse (parsing org mode in python, used in a i3blocks block for _currently working on_)
pip:
name: orgparse
extra_args: --user
- name: gh extension list
command: gh extension list
register: gh_extension_list
- name: gh-notify (github cli extension for notifications)
when: gh_extension_list.stdout.find('meiji163/gh-notify') == -1
shell: gh extension install meiji163/gh-notify
- name: pgcli (more autocompleting (suggestions & joins) & colors than psql)
pip:
name: pgcli
extra_args: --user
- name: i3pystatus
pip:
name: git+https://github.com/enkore/i3pystatus.git
extra_args: --user
- name: git-filter-repo (rewriting git repo history, useful when extracting parts of repo to new repo)
pip:
name: git-filter-repo
extra_args: --user
- name: Symlink dotfiles/bin to ~/bin
file:
src: ~/code/github/chelmertz/dotfiles/bin
dest: ~/bin
state: link
- name: Symlink .bashrc
file:
src: ~/code/github/chelmertz/dotfiles/.bashrc
dest: ~/.bashrc
state: link
- name: Symlink .zshrc
file:
src: ~/code/github/chelmertz/dotfiles/.zshrc
dest: ~/.zshrc
state: link
- name: Symlink dunstrc (notification daemon settings)
file:
src: ~/code/github/chelmertz/dotfiles/dunst
dest: ~/.config/dunst
state: link
- name: Global gitignore file
file:
src: ~/dotfiles/.gitignore_global
dest: ~/.gitignore_global
state: link
- name: Global gitconfig file (includeIf handles work stuff)
file:
src: ~/dotfiles/.gitconfig
dest: ~/.gitconfig
state: link
- name: Global gitconfig file (includeIf handles work stuff)
file:
src: ~/dotfiles/.gitconfig
dest: ~/.gitconfig
state: link
- name: i3blocks, status bar for i3
file:
src: ~/dotfiles/.i3blocks.conf
dest: ~/.i3blocks.conf
state: link
- name: Symlink i3 settings
file:
src: ~/dotfiles/.i3/config
dest: ~/.config/i3/config
state: link
- name: rofi-blah-blah (snippet manager)
git:
repo: https://github.com/chelmertz/rofi-blah-blah
version: master
dest: ~/code/github/chelmertz/rofi-blah-blah/
- name: Clone z (autojump for bash)
git:
repo: https://github.com/rupa/z.git
version: master
dest: ~/code/github/rupa/z/
- name: Clone vim-surround (wrap selection in some bracket/tag, and more)
git:
repo: https://github.com/tpope/vim-surround.git
version: master
dest: ~/.vim/pack/modules/start/vim-surround
# doom emacs begin
- name: Clone doom emacs (a nice emacs "distribution"(?))
git:
repo: https://github.com/hlissner/doom-emacs.git
#depth: 1
dest: ~/.emacs.d
# now, add ~/.emacs.d/bin to PATH and $ doom install
- name: Remove default config
shell: rm -rf ~/.doom.d
- name: Use my doom emacs config
file:
src: ~/dotfiles/.doom.d
dest: ~/.doom.d
state: link
# doom emacs end
- name: Clone grasp (org capture web pages)
git:
repo: https://github.com/karlicoss/grasp
version: master
dest: ~/code/github/karlicoss/grasp
- name: Clone powerlevel10k (zsh prompt)
git:
repo: https://github.com/romkatv/powerlevel10k
dest: ~/github/romkatv/powerlevel10k
depth: 1
- name: Install powerlevel10k into zshrc
ansible.builtin.lineinfile:
path: ~/.zshrc
line: 'source ~/github/romkatv/powerlevel10k/powerlevel10k.zsh-theme'
create: yes
- name: zsh-autosuggestions
git:
repo: https://github.com/zsh-users/zsh-autosuggestions
dest: ~/code/github/zsh-users/zsh-autosuggestions
- name: Install zsh-autosuggestions into zshrc
ansible.builtin.lineinfile:
path: ~/.zshrc
line: 'source ~/code/github/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh'
create: yes
- name: Clone dunst (for dunstify)
git:
repo: https://github.com/dunst-project/dunst
version: master
dest: ~/code/github/dunst-project/dunst
- name: Build and install dunstify
shell: which dunstify || (make dunstify && cp -f dunstify ~/bin/dunstify)
args:
chdir: ~/code/github/dunst-project/dunst
- name: Emoji mode for rofi
git:
repo: https://github.com/nkoehring/rofiemoji
version: master
dest: ~/code/github/nkoehring/rofiemoji
- name: jless (json viewer, json less)
shell: cargo install jless
- name: check dust version
command: dust --version
register: dust_version
- name: dust (rust version of du -sh, easier to parse)
when: dust_version.rc != 0
shell: cargo install du-dust
- name: check bat version
command: bat --version
register: bat_version
- name: bat (cat with colors)
when: bat_version.rc != 0
shell: cargo install bat
- name: fd version
command: fd --version
register: fd_version
- name: fd (find with good performance and smarter syntax)
when: fd_version.rc != 0
shell: cargo install fd-find
- name: xsv version
command: xsv --version
register: xsv_version
- name: xsv (cli util for dealing with csv)
when: xsv_version.rc != 0
shell: cargo install xsv
# this depends on the native bitwarden client (install it manually first, instead of the (broken) one in snap), then "bw login"
- name: bitwarden-rofi
git:
repo: https://github.com/chelmertz/bitwarden-rofi.git
version: master
dest: ~/code/github/chelmertz/bitwarden-rofi
- name: Symlink bwmenu (bitwarden cli) into something on $PATH
file:
src: ~/code/github/chelmertz/bitwarden-rofi/bwmenu
dest: ~/bin/bwmenu
state: link
- name: Rofi config
file:
src: ~/code/github/chelmertz/dotfiles/rofi
dest: ~/.config/rofi
state: link
- name: Symlink Xresources
file:
src: ~/code/github/chelmertz/dotfiles/.Xresources
dest: ~/.Xresources
state: link
- name: Symlink .ideavimrc
file:
src: ~/code/github/chelmertz/dotfiles/.ideavimrc
dest: ~/.ideavimrc
state: link
- name: lazygit (terminal CLI alternative to magit)
shell: go install github.com/jesseduffield/lazygit@latest
- name: serve (http server to quickly serve a directory)
shell: go install github.com/chelmertz/serve@latest
- name: yq (jq but for yaml)
shell: go install github.com/mikefarah/yq/v4@latest
- name: uni (unicode tool for identifying/searching, used in rofi-binding)
shell: go install arp242.net/[email protected]
- name: lazydocker (tui for managing docker)
shell: go install github.com/jesseduffield/[email protected]
- name: gopls (golang language server)
shell: GO111MODULE=on go install golang.org/x/tools/gopls@latest
- name: custom search engines for surfraw
shell: mkdir -p ~/.config/surfraw/ && ln -sf ~/dotfiles/bookmarks ~/.config/surfraw/bookmarks
- name: bash format
shell: GO111MODULE=on go install mvdan.cc/sh/v3/cmd/[email protected]
# start fzf (fuzzy picker/list thing, kind of like rofi in the terminal)
- name: "fzf: git"
git:
repo: https://github.com/junegunn/fzf.git
version: master
dest: ~/code/github/junegunn/fzf
- name: "fzf: build & install"
shell: make && make install && mv bin/fzf ~/bin/fzf
args:
chdir: ~/code/github/junegunn/fzf
# end fzf
# start sysz (tui with fuzzy matching for systemd interfaces, systemctl and journalctl)
- name: "sysz: git"
git:
repo: https://github.com/joehillen/sysz.git
version: master
dest: ~/code/github/joehillen/sysz
- name: "sysz: build & install"
shell: make && install -m755 sysz ~/bin
args:
chdir: ~/code/github/joehillen/sysz
# end sysz
# fzf-docker
- name: "fzf-docker: git"
git:
repo: https://github.com/chelmertz/fzf-docker.git
version: master
dest: ~/code/github/chelmertz/fzf-docker
# end fzf-docker
- name: fx version
command: fx --version
register: fx_version
- name: fx (interactive json explorer for cli)
when: fx_version.rc != 0
shell: go install github.com/antonmedv/fx@latest