-
Notifications
You must be signed in to change notification settings - Fork 1
/
install.conf.yaml
403 lines (304 loc) · 12.1 KB
/
install.conf.yaml
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
---
# vim: foldmarker=[[[,]]]:foldmethod=marker
# SPDX-FileCopyrightText: 2016-2022 Robin Schneider <[email protected]>
#
# SPDX-License-Identifier: CC0-1.0
# yamllint disable rule:line-length
- defaults:
link:
relative: true
canonicalize-path: false
relink: true
glob: true
create: true
shell:
stdout: true
stderr: true
# Machine and install strategy independent. [[[1
- create:
- ~/.local/share/zsh
- ~/.local/usr
- ~/.ssh/multiplex
- ~/.config/k9s/
- shell:
- 'chmod 0700 ~/.ssh'
- 'cd ~/.ssh && for dir in ./*; do if [ -d "$dir" ] && [ "$dir" != "./multiplex" ]; then mkdir -p "$dir/known_hosts.d"; fi ; done'
- 'mkdir -p ~/.asdf-writable/shims && ln -sf node ~/.asdf-writable/shims/nodejs'
- 'mkdir -p ~/.asdf-writable/installs'
- 'mkdir -p ~/.asdf-writable/keyrings'
- 'mkdir -p ~/.asdf-writable/plugins'
- 'if [ "$(find "$PWD/asdf" -maxdepth 1 -type f|wc -l)" != "0" ]; then ln -sf "$PWD/asdf"/* ~/.asdf-writable; fi'
- description: 'Ensure xfconfd is stopped. It will be started again on next access.'
command: 'killall --user "$USER" xfconfd || :'
- description: 'Remove default user data directories if empty.'
command: 'rmdir --ignore-fail-on-non-empty ~/Documents ~/Music ~/Pictures ~/Public ~/Templates ~/Videos || :'
- description: 'Install K9s community Custom Plugins'
command: |-
yq eval-all '. as $item ireduce ({}; . * $item )' $(find submodules/k9s/plugins/ -name 'debug.y?ml' -or -name 'dive.y?ml' -or -name 'helm-values.y?ml' -or -name 'watch-events.y?ml') > ~/.config/k9s/plugins.yaml
- 'mkdir -p ${XDG_DATA_HOME:-$HOME/.local/share}/bash'
- link:
# Bash [[[2
~/.bashrc:
force: true
path: .bashrc
~/.bash_logout:
force: true
path: .bash_logout
~/.bash_profile:
path: .bash_profile
# ZSH [[[2
~/.zshrc:
path: .zshrc
~/.zshenv:
path: .zshenv
~/.config/powerlevel10k/config.zsh:
path: .config/powerlevel10k/config.zsh
~/.config/oh-my-zsh:
path: oh-my-zsh
~/.config/oh-my-zsh-custom:
path: oh-my-zsh-custom
# Tmux [[[2
~/.config/tmux/tmux.conf:
path: .config/tmux/tmux.conf
# Legacy. Needed for backwards compatibility up until Tmux ~3.0.
~/.tmux.conf:
path: .config/tmux/tmux.conf
~/.local/share/tmux:
path: .local/share/tmux
# SSH [[[2
~/.ssh/config_ypid_defaults:
path: .ssh/config_ypid_defaults
~/.ssh/assh.yml:
path: .ssh/assh.yml
~/.sshrc:
path: .sshrc
# NeoVim [[[2
~/.config/nvim:
path: nvim
~/.vim:
path: nvim
~/.vimrc:
path: nvim/init.vim
if: '[ ! -d /mingw64 ]'
~/.vimrc:
path: nvim/init_min.vim
if: '[ -d /mingw64 ]'
~/.vimrc.min:
path: nvim/init_min.vim
# Nix on Debian [[[2
# Create ~/.nix-profile on Qubes OS when Nix was installed and pre-seeded
# in template qubes.
~/.nix-profile:
path: /nix/var/nix/profiles/per-user/$USER/profile
relative: false
if: test -e /nix/var/nix/profiles/per-user/$USER/profile
# ]]]2
# lnav [[[2
~/.config/lnav/configs/:
path: .config/lnav/configs/*
~/.config/lnav/config.json:
path: .config/lnav/config.json
# ]]]2
# Miscellaneous [[[2
~/.config/git/:
path: .config/git/*
~/.gnupg/:
path: .gnupg/*
~/.config/readline/:
path: .config/readline/*
~/.config/latexmk/:
path: .config/latexmk/*
~/.config/qubes-keyboard-layout.rc:
force: true
path: .config/qubes-keyboard-layout.rc
~/.perlcriticrc:
path: .perlcriticrc
~/.perltidyrc:
path: .perltidyrc
~/.config/python/startup:
path: .config/python/startup
~/.config/python_keyring/keyringrc.cfg:
path: .config/python_keyring/keyringrc.cfg
~/.config/shell/:
path: .config/shell/*
~/.config/shell.d/:
path: .config/shell.d/*
~/.local/share/scripts/ypid-scripts-common:
path: scripts
~/.config/synapse:
path: .config/synapse
~/.config/xfce4/helpers.rc:
force: true
path: .config/xfce4/helpers.rc
~/.config/xfce4/panel/:
force: true
path: .config/xfce4/panel/*
~/.config/xfce4/terminal/:
force: true
path: .config/xfce4/terminal/*
# xfconf replaces symlinks if it needs to update a file. Otherwise, it
# leaves the symlink in place.
~/.config/xfce4/xfconf/xfce-perchannel-xml/:
force: true
path: .config/xfce4/xfconf/xfce-perchannel-xml/*
~/.config/dconf/:
path: scripts/dconf-backup/*
~/.config/neo_layout_viewer.conf:
path: .config/neo_layout_viewer.conf
~/.config/ranger/rc.conf:
path: ranger.rc.conf
~/.config/ranger/commands.py:
path: submodules/dotfiles-fiatjaf/ranger-commands.py
~/.config/ranger/plugins/linemode_gitannex.py:
path: submodules/dotfiles-fiatjaf/ranger-plugins/linemode_gitannex.py
~/.config/doublecmd/scripts:
path: .config/doublecmd/scripts
~/.config/mr/mrconfig:
path: myrepos/mrconfig
~/.config/mr/library-loaders:
path: myrepos/mr-config-adam/library-loaders
~/.config/mr/lib.d/git:
path: myrepos/mr-config-adam/sh.d/git
~/.config/mr/lib.d/git-remotes:
path: myrepos/mr-config-adam/sh.d/git-remotes
~/.local/share/scripts/git-config-adam/git-url-rewrite:
path: submodules/git-config-adam/bin/git-url-rewrite
# https://git-annex.branchable.com/tips/finding_duplicate_files/
~/.local/share/scripts/git-config-adam/git-annex-finddups:
path: submodules/git-config-adam/bin/git-annex-finddups
# Poorly maintained. Rather use generic tool like lnav.
# ~/.local/share/scripts/k9s/kubectl-jq:
# path: submodules/k9s/plugins/kubectl-plugins/kubectl-jq
~/.config/k9s/config.yaml:
path: .config/k9s/config.yaml
~/.config/k9s/skins/:
path: submodules/k9s/skins/*
'~/.config/autokey/data/Emitting keystrokes':
path: '.config/autokey/Emitting keystrokes'
~/.config/ripgrep/ripgreprc:
path: .config/ripgrep/ripgreprc
~/.config/mpv/mpv.conf:
path: .config/mpv/mpv.conf
~/.config/yt-dlp/watch-config:
path: .config/yt-dlp/watch-config
~/.config/nix/nix.conf:
path: .config/nix/nix.conf
~/.config/evolution/accels:
path: .config/evolution/accels
~/.config/atuin/config.toml:
path: .config/atuin/config.toml
~/.Xresources:
path: .Xresources
~/.config/npm/npmrc:
path: .config/npm/npmrc
~/.logseq/config/config.edn:
path: .logseq/config/config.edn
# ]]]2
- link:
~/.config/dconf/:
path: .config/dconf/*
# Copy files instead of linking them and then let the application manage it to
# avoid diffs in git during normal application usage.
- shell:
- 'chmod 0700 ~/.gnupg'
- 'rsync --ignore-existing .ssh/config ~/.ssh'
- 'rsync --ignore-existing --recursive .config/wireshark/ ~/.config/wireshark'
- 'rsync --ignore-existing --recursive .config/smplayer/ ~/.config/smplayer'
- 'test -L ~/.config/flameshot/flameshot.ini && rm ~/.config/flameshot/flameshot.ini'
- 'rsync --ignore-existing --recursive .config/flameshot/ ~/.config/flameshot'
- 'rsync --ignore-existing --recursive .config/yt-dlp/ ~/.config/yt-dlp'
- 'test -L ~/.config/htop/htoprc && rm ~/.config/htop/htoprc'
- 'rsync --ignore-existing --recursive .config/htop/ ~/.config/htop'
- 'rsync --ignore-existing --recursive .config/libvirt/ ~/.config/libvirt'
# I found no reliable way to configure nor even preseed config of xfce4-timer-plugin.
# I give up for now.
# - description: 'Bootstrap required legacy file (I assume)'
# # Not reliable. If the plugin has no times, remove and readd the plugin. Then it should pick up the settings.
# # Test next: Copy both files as regular files instead of symlinks.
# command: 'rsync --ignore-existing --recursive .config/xfce4/panel/xfce4-timer-plugin-2.rc ~/.config/xfce4/panel/XfceTimer.rc'
- description: 'Size matters when having to transfer it for every SSH login. Put stripped down files in ~/.sshrc.d/'
command: |-
for file_path in .zshrc .bashrc .config/shell.d/50_public .config/git/config .config/htop/htoprc .config/tmux/tmux.conf .local/share/tmux/plugins/tmux-prefix-highlight/prefix_highlight.tmux .local/share/tmux/plugins/tmux-colors-solarized/tmuxcolors-dark.conf .local/share/tmux/plugins/tmux-sensible/sensible.tmux .config/shell/global .config/shell/tmux-attach .config/shell/login-banner scripts/sc .config/lnav/config.json scripts/cron-list-all scripts/ssh_wrapper; do
mkdir -p "$(dirname "$HOME/.sshrc.d/$file_path")"
grep -Ev '^\s*#([^!]|$)' "$file_path" > "$HOME/.sshrc.d/$file_path"
done
chmod +x "$HOME/.sshrc.d"/scripts/* "$HOME/.sshrc.d"/.config/shell/login-banner
ln -sf .config/tmux/tmux.conf ~/.sshrc.d/.tmux.conf
for file_path in oh-my-zsh/plugins/git/git.plugin.zsh oh-my-zsh/plugins/vi-mode/vi-mode.plugin.zsh ./oh-my-zsh/lib/*.zsh ./oh-my-zsh-custom/themes/ypid.zsh-theme; do
mkdir -p "$(dirname "$HOME/.sshrc.d/.config/$file_path")"
grep -Ev '^\s*#([^!]|$)' "$file_path" > "$HOME/.sshrc.d/.config/$file_path"
done
grep -Ev '^(\s*"|$)' nvim/init_min.vim > ~/.sshrc.d/.vimrc.min
# Machine dependent (auto detected). [[[1
- shell:
- command: |
if [[ -d ~/.gnupg/private-keys-v1.d/ ]] && ls -1qA ~/.gnupg/private-keys-v1.d/ | grep -q . || [[ -e /rw/config/gpg-split-domain ]]; then
echo "Enable git commit and tag signing using GnuPG."
touch ~/.gitconfig
git config --global commit.gpgsign true
git config --global tag.gpgsign true
if [[ -e /rw/config/gpg-split-domain ]]; then
git config --global gpg.program qubes-gpg-client-wrapper
fi
if [[ -e /run/qubes/this-is-appvm ]] || [[ -e /run/qubes/this-is-templatevm ]]; then
git config --global credential.helper store
fi
fi
# Editable installation specific. [[[1
- link:
~/.config/mimeapps.list:
path: .config/mimeapps.list
if: 'test -w .'
~/.local/share/applications/:
path: .local/share/applications/*
if: 'test -w .'
~/.config/Clementine/:
path: .config/Clementine/*
if: 'test -w .'
~/.config/obs-studio/basic/profiles/Untitled/:
path: .config/obs-studio/basic/profiles/Untitled/*
if: 'test -w .'
~/.config/doublecmd/doublecmd.xml:
path: .config/doublecmd/doublecmd.xml
if: 'test -w .'
~/.config/doublecmd/shortcuts.scf:
path: .config/doublecmd/shortcuts.scf
if: 'test -w .'
# Read-only installation specific. [[[1
- shell:
- command: |
if ! test -w .; then
rsync --recursive ${YPID_DOT_IGNORE_EXISTING:---ignore-existing} \
.local/share/applications \
~/.local/share/
rsync --recursive ${YPID_DOT_IGNORE_EXISTING:---ignore-existing} \
.config/Clementine \
.config/mimeapps.list \
.config/obs-studio \
~/.config/
rsync --recursive ${YPID_DOT_IGNORE_EXISTING:---ignore-existing} \
.config/doublecmd/doublecmd.xml \
.config/doublecmd/shortcuts.scf \
~/.config/doublecmd
fi
# Needs to be run with X11 $DISPLAY set:
- 'if command -v dconf && [ ! -e ~/.config/dconf/user ]; then make --directory ~/.config/dconf restore || true; fi'
- 'if [ ! -e "$HOME/.mrconfig" ]; then cp myrepos/mrconfig_home_template "$HOME/.mrconfig"; fi'
# Clean up legacy. [[[1
- clean:
- '~'
- '~/.config'
- '~/.config/git'
- '~/.config/shell.d'
- '~/.config/xfce4/panel'
- '~/.config/lnav/configs'
- '~/.config/k9s/skins'
# Legacy support. [[[1
# This needs to be at the end because .config/mimeapps.list needs to exist
# first.
- link:
# Although deprecated, several applications still read/write to
# ~/.local/share/applications/mimeapps.list
# Ref: https://wiki.archlinux.org/title/XDG_MIME_Applications#mimeapps.list
~/.local/share/mimeapps.list:
path: ~/.config/mimeapps.list