-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbootstrap.sh
163 lines (138 loc) · 4.73 KB
/
bootstrap.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
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
#! bin/bash
############################
# Dev setup for Arch linux #
############################
## Move gnupg and ssh aside
# mv ~/.ssh ~/.ssh.old
# mv ~/.gnupg ~/.gnupg.old
## Generate a new key
# ssh-keygen -t ed25519
yay -Syyuu
yay -R libreoffice-still --noconfirm
yay -S \
`# Build essentials` \
base-devel \
`# Theming` \
gnome-shell-extension-topicons-plus chrome-gnome-shell-git \
materia-theme pop-icon-theme xcursor-oxygen \
ttf-fantasque-sans \
`# Terminal` \
kitty noto-fonts-emoji \
starship \
font-victor-mono \
xcalib zsh-syntax-highlighting most \
openssh tree the_silver_searcher fzf \
git tig git-toolbelt git-delta git-secret github-cli git-absorb \
sdcv stardict-oald stardict-thesaurus-ee \
libsecret-tools \
cloc cheat-git \
bat \
colordiff \
`# Languages` \
python-pipx python-pew \
clojure leiningen \
go \
ghcup-hs-bin \
rust \
ruby rbenv ruby-build bower \
nodejs npm yarn jq fnm \
`# Services` \
postgresql libmemcached freetype2 \
`# SAAS` \
heroku-cli google-cloud-sdk \
`# AWS` \
aws-cli amazon-ecr-credential-helper \
`# Kubernetes` \
kubectx kubectl \
`# Editing text` \
vim neovim editorconfig-core-c xsel \
typescript-language-server-bin \
`# Creating or editing images` \
peek optipng jpegoptim \
`# Linting` \
shellcheck bashate \
yamllint \
`# Email` \
neomutt perl-curses-ui perl-extract-url msmtp offlineimap3-git notmuch-runtime elinks python-keyring \
`# Virtualisation` \
docker docker-compose-cli dive lazy-docker \
`# Office`
libreoffice-fresh libreoffice-fresh-en-gb \
`# Keeping notes` \
obsidian \
`# Boost input volume` \
paman \
`# Random tools` \
strace bind net-tools \
`# Printer. Set up via CUPS http://localhost:631` \
cups-xerox-b2xx \
--noconfirm
pipx install black
pipx install flake8
pipx install isort
pipx install grip
pipx install httpie
pipx install mypy
pipx install pgcli
pipx install pipenv
pipx install poetry
pipx install pre-commit
pipx install pylint
pipx install python-lsp-server
pipx inject python-lsp-server pylsp-mypy
# Put headers in the right place for `pip install pillow`.
sudo ln -s /usr/include/freetype2 /usr/include/freetype
# Set up postgres clusters, and enable service
sudo -u postgres initdb --locale en_GB.UTF-8 -E UTF8 -D '/var/lib/postgres/data'
systemctl enable postgresql.service
systemctl start postgresql.service
# Add user to docker group
# YOU MUST REBOOT FOR THIS TO TAKE EFFECT.
sudo usermod -aG docker charlie
# Download dotfiles
DOTFILES_DIR=~/personal/dotfiles
mkdir -p ~/personal
git clone git@github.com:meshy/dotfiles.git $DOTFILES_DIR
git -C $DOTFILES_DIR submodule update --init --recursive
# Install softlinks
$DOTFILES_DIR/install
# Install shell extras
echo 'source ~/.sh_rc' >> ~/.zshrc
# Make a directory to store code projects
mkdir -p ~/code
# Install "alex" to lint for considerate writing
sudo npm install alex --global
# Install gitree for viewing git repos in tree form.
sudo npm install @jpwilliams/gitree --global
# Use ghcup to install Haskell GHC
ghcup install ghc
# Install email syncing service
systemctl enable offlineimap-personal.service --user
systemctl start offlineimap-personal.service --user
# Configure gnome keyboard shortcuts
# See http://askubuntu.com/a/597414/30904
MEDIA_KEYS="org.gnome.settings-daemon.plugins.media-keys"
KEY_BINDING=$MEDIA_KEYS".custom-keybinding"
KEY_BINDING_PATH="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings"
CUSTOM_0=$KEY_BINDING_PATH"/custom0/"
CUSTOM_1=$KEY_BINDING_PATH"/custom1/"
gsettings set $MEDIA_KEYS custom-keybindings "['$CUSTOM_0', '$CUSTOM_1']"
gsettings set $KEY_BINDING:$CUSTOM_0 name 'Open terminal'
gsettings set $KEY_BINDING:$CUSTOM_0 command 'kitty'
gsettings set $KEY_BINDING:$CUSTOM_0 binding '<Primary><Alt>t'
gsettings set $KEY_BINDING:$CUSTOM_1 name 'Invert colours'
gsettings set $KEY_BINDING:$CUSTOM_1 command 'xcalib -invert -alter'
gsettings set $KEY_BINDING:$CUSTOM_1 binding '<Primary><Alt>i'
echo "Don't forget to install the gTile extension /~https://github.com/gTile/gTile"
# Make alt-tab work across workspaces.
gsettings set org.gnome.shell.window-switcher current-workspace-only true
# Get rid of login lock after 3 failed attempts:
# in /etc/security/faillock.conf, set `deny = 0` to disable the lockout.
# See https://wiki.archlinux.org/title/Security#Lock_out_user_after_three_failed_login_attempts
# Fix X apps unable to open firefox when in wayland:
# sudo nvim /usr/share/applications/firefox.desktop
# Change this:
# Exec=/usr/lib/firefox/firefox
# To this:
# Exec=env MOZ_DBUS_REMOTE=1 /usr/lib/firefox/firefox
# https://bugzilla.mozilla.org/show_bug.cgi?id=1508803