blob: f1e32673c7868e490f2794fbdedabf350d85d3a9 (
plain)
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
|
#!/bin/sh
cd "$(dirname "$0")"
. "$HOME/.profile"
. ./lib/bootstrap
# ensure required packages are installed
begintask "installing packages"
"$XDG_CONFIG_HOME/yadm/install-arch" > pkgs.log 2>&1
endtask
[ $? -eq 0 ] && rm -f pkgs.log || echo " (saved output to pkgs.log)"
begintask "render templated files"
s yadm alt
endtask
begintask "ensure dynamic theme files"
s ~/.local/share/bin/mode dark
endtask
begintask "tidy up repository files"
s yadm reflog expire --expire-unreachable=now --all &&\
s yadm gc --prune=now
endtask
# note: vim-plug is already installed system-wide (see ./packages-arch)
begintask "installing vim plugins"
COC_PLUGINS="$(jq --raw-output '.dependencies | keys | join(" ")' \
"$XDG_CONFIG_HOME/coc/extensions/package.json")"
s nvim --headless +"PlugInstall --sync" +qa &&\
s nvim --headless +"CocInstall -sync $COC_PLUGINS" +qa
endtask
[ -e "$HOME/readme.md" ] ||\
[ $(yadm status -s "$HOME/readme.md" | wc -l) -gt 0 ] && (
begintask "removing readme.md from home"
cd
rm -f readme.md &&\
yadm update-index --skip-worktree readme.md
endtask
)
! command -v st > /dev/null && [ ! -e ~/.local/st ] && (
begintask "building st (terminal) from source"
mkdir -p ~/.local
cd ~/.local
s git clone --depth 1 https://git.pipeframe.xyz/lonkaars/st
cd st
s make -j
endtask
)
[ "$(find ~/.ssh -name 'id*' | wc -l)" -eq 0 ] && (
begintask "generating ssh keys"
s ssh-keygen -q -N "" < /dev/zero
endtask
)
begintask "create XDG user directories"
s xdg-user-dirs-update
endtask
# TODO: GTK themes
# TODO: OpenZone_Black cursor theme
# TODO: install from scratch and see what's missing
cat << EOF
bootstrap finished in $(finishtime)!
follow-up steps to finish setup:
- install GPG keys
- install nonfree fonts
- clone the pass repository in ~/.local/share/pass
- run the system bootstrap script in ~/.config/yadm/root/bootstrap
- make the switch to microsoft edge
EOF
|