-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·49 lines (38 loc) · 970 Bytes
/
install
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
#!/usr/bin/env zsh
autoload -U colors
colors
install_dependencies() {
sudo apt install stow
}
link_files() {
# sudo ln -s $(which batcat) /usr/local/bin/bat
# sudo ln -s $(which fdfind) /usr/local/bin/fd
}
setup_copilot() {
echo "\n -- installing copilot -- \n"
if [ -f /etc/spin/secrets/copilot_hosts.json ]; then
mkdir -p "${HOME}/.config/github-copilot"
cp /etc/spin/secrets/copilot_hosts.json "${HOME}/.config/github-copilot/hosts.json"
fi
}
stow_dirs() {
stow -d ~/dotfiles nvim
stow -d ~/dotfiles git
stow -d ~/dotfiles tmux
}
setup_tmux() {
echo "\n -- setup tmux -- \n"
# spin hostname
export FQDN=$(cat /etc/spin/machine/fqdn | sed "s/\\..*//")
# install tmux plugins
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
~/.tmux/plugins/tpm/scripts/install_plugins.sh
}
if [ $SPIN ]; then
install_dependencies
link_files
stow_dirs
setup_tmux
setup_copilot
timeout 2m nvim --headless "+Lazy! sync" +qa || true
fi