Skip to content

Commit 17b06ec

Browse files
committed
Initial pass at automation
1 parent 10f6112 commit 17b06ec

33 files changed

+1433
-0
lines changed

.editorconfig

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Baseline for every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
indent_style = space
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.retry

.vscode/settings.json

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"editor.tabSize": 2,
3+
"files.associations": {
4+
"*.yaml": "ansible"
5+
}
6+
}

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Linux Dev Machine Setup
2+
3+
This repository contains useful scripts to set up a Linux development machine. They assume Ubuntu 18.04 or later, and have been tested with the following OSes:
4+
5+
- Ubuntu ([download](https://www.ubuntu.com/download/desktop))
6+
- 18.04 (bionic)
7+
- 18.10 (cosmic)
8+
- 19.04 (disco)
9+
- Pop!_OS ([download](https://system76.com/pop))
10+
- 18.04
11+
- 18.10
12+
- 19.04
13+
14+
Other Ubuntu variants may work (like Mint) but they have not been tested. Non-Ubuntu variants are unsupported (with no intention of supporting them).
15+
16+
Supported shell for customization work is `bash`; other shells are left as an exercise to the reader.
17+
18+
# Pre-Requisites
19+
20+
You need to install Ansible:
21+
22+
```bash
23+
$ sudo apt -y install ansible
24+
```
25+
26+
If you want to close this Git repo, you should also install Git (`sudo apt -y install git`). These scripts will install it for you if you brought these files along in some other way.
27+
28+
# Running
29+
30+
Before running the scripts, please review `_all.yaml` and comment out software you don't want installed. In particular, you should examine every `*-customization.yaml` file as these contain my personal opinionated customizations; feel free to comment out sections of those files, or ignore them entirely.
31+
32+
To run the setup:
33+
34+
```bash
35+
$ ansible-playbook -K _all.yaml
36+
```
37+
38+
You will be prompted for your sudo password.
39+
40+
_**After installation is complete, you must reboot the computer/VM.**_

_all.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
#########################################################################################
2+
##### Note that import order here is important, so rearranging import lists
3+
##### is **not** recommended.
4+
#####
5+
##### Any file which ends in -customization includes opinionated personal customizations.
6+
##### It is highly recommended that you look inside them or comment them out from here.
7+
#########################################################################################
8+
9+
- name: Configure Ubuntu machine for developement work
10+
hosts: 127.0.0.1
11+
connection: local
12+
13+
##### Operating system packages and configuration
14+
15+
- import_playbook: core.yaml # Core OS packages
16+
- import_playbook: core-customization.yaml # Core OS customization
17+
- import_playbook: fortune-customization.yaml # Show fortune through cowsay and lolcat on shell start
18+
- import_playbook: gnome-customization.yaml # GNOME extensions, themes, UI tweaks, keyboard shortcuts, favorites
19+
20+
##### Applications (free)
21+
22+
- import_playbook: alacritty.yaml # High performance terminal app
23+
- import_playbook: alacritty-customization.yaml # Alacritty UI customization
24+
- import_playbook: azure-cli.yaml # Azure CLI (az)
25+
- import_playbook: docker.yaml # Docker Community Edition
26+
- import_playbook: docker-customization.yaml # Docker custom shell commands
27+
- import_playbook: dotnet-core.yaml # .NET Core SDK
28+
- import_playbook: git-bash.yaml # Git prompt integration for bash
29+
- import_playbook: git-bash-customization.yaml # Customized git-bash prompt
30+
- import_playbook: google-chrome.yaml # Google Chrome (needed for Teams)
31+
- import_playbook: kubectl.yaml # Kubernetes CLI
32+
- import_playbook: kubectl-customization.yaml # Bash aliases for kubectl
33+
- import_playbook: kvm.yaml # Virtualization tools
34+
- import_playbook: nodejs.yaml # NodeJS and nvm (Node Version Manager)
35+
- import_playbook: powershell-core.yaml # PowerShell Core (used in automation)
36+
- import_playbook: prettyping.yaml # Prettier version of ping w/ graphs
37+
- import_playbook: ripgrep.yaml # Git-aware recursive grep tool
38+
- import_playbook: slack.yaml # Slack Desktop app
39+
- import_playbook: remmina.yaml # RDP/X/VNC/SSH client
40+
- import_playbook: vscode.yaml # Visual Studio Code
41+
- import_playbook: vscode-customization.yaml # Extensions
42+
43+
##### Applications (commercial license required)
44+
45+
- import_playbook: beyond-compare.yaml # Beyond Compare 4
46+
- import_playbook: insync.yaml # Insync Google Drive sync tool
47+
- import_playbook: sublime.yaml # Sublime Text and Sublime Merge

alacritty-customization.yaml

+217
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
- name: Alacritty customization
2+
hosts: 127.0.0.1
3+
connection: local
4+
5+
tasks:
6+
- name: Ensure Alacritty configuration folder exists
7+
file:
8+
path: ~/.config/alacritty
9+
state: directory
10+
11+
- name: Update ~/.config/alacritty/alacritty.yml
12+
copy:
13+
dest: ~/.config/alacritty/alacritty.yml
14+
content: |
15+
window:
16+
dimensions:
17+
columns: 0
18+
lines: 0
19+
padding:
20+
x: 8
21+
y: 8
22+
dynamic_padding: false
23+
decorations: full
24+
startup_mode: Maximized
25+
26+
scrolling:
27+
history: 10000
28+
multiplier: 3
29+
faux_multiplier: 3
30+
auto_scroll: false
31+
32+
tabspaces: 8
33+
34+
font:
35+
normal:
36+
family: UbuntuMono NF
37+
style: Regular
38+
bold:
39+
style: Regular
40+
size: 11.0
41+
offset:
42+
x: 0
43+
y: 0
44+
glyph_offset:
45+
x: 0
46+
y: 0
47+
48+
render_timer: false
49+
50+
persistent_logging: false
51+
52+
draw_bold_text_with_bright_colors: true
53+
54+
colors:
55+
primary:
56+
background: '0x2e3436'
57+
foreground: '0xb5bbae'
58+
normal:
59+
black: '0x2e3436'
60+
red: '0xae5e5e'
61+
green: '0x4e9a06'
62+
yellow: '0xc4a000'
63+
blue: '0x3465a4'
64+
magenta: '0x75507b'
65+
cyan: '0x06989a'
66+
white: '0xb5bbae'
67+
bright:
68+
black: '0x555753'
69+
red: '0xf49797'
70+
green: '0x8ae234'
71+
yellow: '0xfce94f'
72+
blue: '0x729fcf'
73+
magenta: '0xad7fa8'
74+
cyan: '0x34e2e2'
75+
white: '0xfbfbfb'
76+
indexed_colors: []
77+
78+
visual_bell:
79+
animation: EaseOutExpo
80+
duration: 0
81+
color: '0xffffff'
82+
83+
background_opacity: 1.0
84+
85+
mouse_bindings:
86+
- { mouse: Middle, action: PasteSelection }
87+
88+
mouse:
89+
double_click: { threshold: 300 }
90+
triple_click: { threshold: 300 }
91+
hide_when_typing: false
92+
url:
93+
modifiers: Control
94+
95+
selection:
96+
semantic_escape_chars: ",│`|:\"' ()[]{}<>"
97+
save_to_clipboard: false
98+
99+
dynamic_title: true
100+
101+
cursor:
102+
style: Block
103+
unfocused_hollow: true
104+
105+
live_config_reload: true
106+
107+
alt_send_esc: true
108+
109+
key_bindings:
110+
- { key: T, mods: Control|Shift, action: SpawnNewInstance }
111+
112+
- { key: Paste, action: Paste }
113+
- { key: Copy, action: Copy }
114+
- { key: L, mods: Control, action: ClearLogNotice }
115+
- { key: L, mods: Control, chars: "\x0c" }
116+
- { key: Home, mods: Alt, chars: "\x1b[1;3H" }
117+
- { key: Home, chars: "\x1bOH", mode: AppCursor }
118+
- { key: Home, chars: "\x1b[H", mode: ~AppCursor }
119+
- { key: End, mods: Alt, chars: "\x1b[1;3F" }
120+
- { key: End, chars: "\x1bOF", mode: AppCursor }
121+
- { key: End, chars: "\x1b[F", mode: ~AppCursor }
122+
- { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt }
123+
- { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt }
124+
- { key: PageUp, mods: Control, chars: "\x1b[5;5~" }
125+
- { key: PageUp, mods: Alt, chars: "\x1b[5;3~" }
126+
- { key: PageUp, chars: "\x1b[5~" }
127+
- { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt }
128+
- { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt }
129+
- { key: PageDown, mods: Control, chars: "\x1b[6;5~" }
130+
- { key: PageDown, mods: Alt, chars: "\x1b[6;3~" }
131+
- { key: PageDown, chars: "\x1b[6~" }
132+
- { key: Tab, mods: Shift, chars: "\x1b[Z" }
133+
- { key: Back, chars: "\x7f" }
134+
- { key: Back, mods: Alt, chars: "\x1b\x7f" }
135+
- { key: Insert, chars: "\x1b[2~" }
136+
- { key: Delete, chars: "\x1b[3~" }
137+
- { key: Left, mods: Shift, chars: "\x1b[1;2D" }
138+
- { key: Left, mods: Control, chars: "\x1b[1;5D" }
139+
- { key: Left, mods: Alt, chars: "\x1b[1;3D" }
140+
- { key: Left, chars: "\x1b[D", mode: ~AppCursor }
141+
- { key: Left, chars: "\x1bOD", mode: AppCursor }
142+
- { key: Right, mods: Shift, chars: "\x1b[1;2C" }
143+
- { key: Right, mods: Control, chars: "\x1b[1;5C" }
144+
- { key: Right, mods: Alt, chars: "\x1b[1;3C" }
145+
- { key: Right, chars: "\x1b[C", mode: ~AppCursor }
146+
- { key: Right, chars: "\x1bOC", mode: AppCursor }
147+
- { key: Up, mods: Shift, chars: "\x1b[1;2A" }
148+
- { key: Up, mods: Control, chars: "\x1b[1;5A" }
149+
- { key: Up, mods: Alt, chars: "\x1b[1;3A" }
150+
- { key: Up, chars: "\x1b[A", mode: ~AppCursor }
151+
- { key: Up, chars: "\x1bOA", mode: AppCursor }
152+
- { key: Down, mods: Shift, chars: "\x1b[1;2B" }
153+
- { key: Down, mods: Control, chars: "\x1b[1;5B" }
154+
- { key: Down, mods: Alt, chars: "\x1b[1;3B" }
155+
- { key: Down, chars: "\x1b[B", mode: ~AppCursor }
156+
- { key: Down, chars: "\x1bOB", mode: AppCursor }
157+
- { key: F1, chars: "\x1bOP" }
158+
- { key: F2, chars: "\x1bOQ" }
159+
- { key: F3, chars: "\x1bOR" }
160+
- { key: F4, chars: "\x1bOS" }
161+
- { key: F5, chars: "\x1b[15~" }
162+
- { key: F6, chars: "\x1b[17~" }
163+
- { key: F7, chars: "\x1b[18~" }
164+
- { key: F8, chars: "\x1b[19~" }
165+
- { key: F9, chars: "\x1b[20~" }
166+
- { key: F10, chars: "\x1b[21~" }
167+
- { key: F11, chars: "\x1b[23~" }
168+
- { key: F12, chars: "\x1b[24~" }
169+
- { key: F1, mods: Shift, chars: "\x1b[1;2P" }
170+
- { key: F2, mods: Shift, chars: "\x1b[1;2Q" }
171+
- { key: F3, mods: Shift, chars: "\x1b[1;2R" }
172+
- { key: F4, mods: Shift, chars: "\x1b[1;2S" }
173+
- { key: F5, mods: Shift, chars: "\x1b[15;2~" }
174+
- { key: F6, mods: Shift, chars: "\x1b[17;2~" }
175+
- { key: F7, mods: Shift, chars: "\x1b[18;2~" }
176+
- { key: F8, mods: Shift, chars: "\x1b[19;2~" }
177+
- { key: F9, mods: Shift, chars: "\x1b[20;2~" }
178+
- { key: F10, mods: Shift, chars: "\x1b[21;2~" }
179+
- { key: F11, mods: Shift, chars: "\x1b[23;2~" }
180+
- { key: F12, mods: Shift, chars: "\x1b[24;2~" }
181+
- { key: F1, mods: Control, chars: "\x1b[1;5P" }
182+
- { key: F2, mods: Control, chars: "\x1b[1;5Q" }
183+
- { key: F3, mods: Control, chars: "\x1b[1;5R" }
184+
- { key: F4, mods: Control, chars: "\x1b[1;5S" }
185+
- { key: F5, mods: Control, chars: "\x1b[15;5~" }
186+
- { key: F6, mods: Control, chars: "\x1b[17;5~" }
187+
- { key: F7, mods: Control, chars: "\x1b[18;5~" }
188+
- { key: F8, mods: Control, chars: "\x1b[19;5~" }
189+
- { key: F9, mods: Control, chars: "\x1b[20;5~" }
190+
- { key: F10, mods: Control, chars: "\x1b[21;5~" }
191+
- { key: F11, mods: Control, chars: "\x1b[23;5~" }
192+
- { key: F12, mods: Control, chars: "\x1b[24;5~" }
193+
- { key: F1, mods: Alt, chars: "\x1b[1;6P" }
194+
- { key: F2, mods: Alt, chars: "\x1b[1;6Q" }
195+
- { key: F3, mods: Alt, chars: "\x1b[1;6R" }
196+
- { key: F4, mods: Alt, chars: "\x1b[1;6S" }
197+
- { key: F5, mods: Alt, chars: "\x1b[15;6~" }
198+
- { key: F6, mods: Alt, chars: "\x1b[17;6~" }
199+
- { key: F7, mods: Alt, chars: "\x1b[18;6~" }
200+
- { key: F8, mods: Alt, chars: "\x1b[19;6~" }
201+
- { key: F9, mods: Alt, chars: "\x1b[20;6~" }
202+
- { key: F10, mods: Alt, chars: "\x1b[21;6~" }
203+
- { key: F11, mods: Alt, chars: "\x1b[23;6~" }
204+
- { key: F12, mods: Alt, chars: "\x1b[24;6~" }
205+
- { key: F1, mods: Super, chars: "\x1b[1;3P" }
206+
- { key: F2, mods: Super, chars: "\x1b[1;3Q" }
207+
- { key: F3, mods: Super, chars: "\x1b[1;3R" }
208+
- { key: F4, mods: Super, chars: "\x1b[1;3S" }
209+
- { key: F5, mods: Super, chars: "\x1b[15;3~" }
210+
- { key: F6, mods: Super, chars: "\x1b[17;3~" }
211+
- { key: F7, mods: Super, chars: "\x1b[18;3~" }
212+
- { key: F8, mods: Super, chars: "\x1b[19;3~" }
213+
- { key: F9, mods: Super, chars: "\x1b[20;3~" }
214+
- { key: F10, mods: Super, chars: "\x1b[21;3~" }
215+
- { key: F11, mods: Super, chars: "\x1b[23;3~" }
216+
- { key: F12, mods: Super, chars: "\x1b[24;3~" }
217+
- { key: NumpadEnter, chars: "\n" }

alacritty.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
- name: Alacritty
2+
hosts: 127.0.0.1
3+
connection: local
4+
5+
tasks:
6+
- name: Alacritty on Pop!_OS
7+
block:
8+
- name: Install Alacritty (Pop!_OS)
9+
become: yes
10+
apt:
11+
package: alacritty
12+
13+
when: "'Pop!_OS' in hostvars[inventory_hostname].ansible_facts.lsb.description"
14+
15+
- name: Alacritty on Ubuntu
16+
block:
17+
- name: Install Alacritty pre-requisites (Ubuntu)
18+
become: yes
19+
apt:
20+
package:
21+
- cargo
22+
- cmake
23+
- libfontconfig1-dev
24+
- libfreetype6-dev
25+
26+
- name: Build Alacritty (Ubuntu)
27+
command: cargo install --git https://github.com/jwilm/alacritty
28+
args:
29+
creates: ~/.cargo/bin/alacritty
30+
31+
- name: Install Alacritty (Ubuntu)
32+
become: yes
33+
copy:
34+
src: "{{ lookup('env', 'HOME') }}/.cargo/bin/alacritty"
35+
dest: /usr/local/bin/alacritty
36+
mode: 0755
37+
remote_src: yes
38+
39+
- name: Make Alacritty a terminal alternative (Ubuntu)
40+
become: yes
41+
alternatives:
42+
name: x-terminal-emulator
43+
link: /usr/bin/x-terminal-emulator
44+
path: /usr/local/bin/alacritty
45+
priority: 20
46+
47+
- name: Download Alacritty icon (Ubuntu)
48+
become: yes
49+
get_url:
50+
url: https://raw.githubusercontent.com/jwilm/alacritty/master/extra/logo/alacritty-term.svg
51+
dest: /usr/share/icons/Alacritty.svg
52+
53+
- name: Download Alacritty desktop definition (Ubuntu)
54+
become: yes
55+
get_url:
56+
url: https://raw.githubusercontent.com/jwilm/alacritty/master/extra/linux/alacritty.desktop
57+
dest: /usr/share/applications/alacritty.desktop
58+
59+
when: "'Pop!_OS' not in hostvars[inventory_hostname].ansible_facts.lsb.description"

0 commit comments

Comments
 (0)