-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.sh
executable file
·149 lines (123 loc) · 3.89 KB
/
setup.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
#!/bin/bash
# source helper functions
source ./scripts/helper-funcs.sh && echo "$CNT - Sourced helper functions"
# language servers to install
lsp_stage=(
bash-language-server
python-lsp-server
vscode-langservers-extracted
terraform-ls
texlab
marksman
taplo-cli
gopls
dockerfile-language-server
rust-analyzer
)
# tools to install
tool_stage=(
helix
kitty
lf
lazygit
bat
fzf
exa
git-delta-git
tmux
ripgrep
stow
curl
wget
jq
xclip
)
# miscellaneous
misc_stage=(
zsh
pyenv
python-virtualenv
python-pip
micromamba-bin
go
zsh-antidote
zsh-theme-powerlevel10k
ttf-firacode-nerd
inter-font
wl-clipboard
)
#software for nvidia GPU only
nvidia_drivers_stage=(
linux-headers
nvidia-dkms
nvidia-settings
libva
libva-nvidia-driver-git
)
# nvidia_cudnn_stage=()
# clear the screen
clear
# let the user know that we will use sudo
echo -e "$CNT - This script will run some commands that require sudo. You will be prompted to enter your password.
If you are worried about entering your password then you may want to review the content of the script."
sleep 1
# give the user an option to exit out
read -rep $'[\e[1;33mACTION\e[0m] - Would you like to continue with the install (y,n) ' CONTINST
if [[ $CONTINST == "Y" || $CONTINST == "y" ]]; then
echo -e "$CNT - Setup starting..."
sudo touch /tmp/setup.tmp
else
echo -e "$CNT - This script will now exit, no changes were made to your system."
exit
fi
# checks for paru, and installs it if it is not found
install_paru_if_not_found
### Install all of the above pacakges ####
read -rep $'[\e[1;33mACTION\e[0m] - Would you like to install the packages? (y,n) ' INST
if [[ $INST == "Y" || $INST == "y" ]]; then
# LSP Stage - Language Servers
echo -e "$CNT - LSP Stage - Installing Language Servers, this may take a while..."
for SOFTWR in ${lsp_stage[@]}; do
install_software_paru $SOFTWR
done
# dev tool Stage - dev tools
echo -e "$CNT - Installing dev tools, this may take a while..."
for SOFTWR in ${tool_stage[@]}; do
install_software_paru $SOFTWR
done
# misc Stage - Supercharging Shell
echo -e "$CNT - Supercharging your shell, this may take a while..."
for SOFTWR in ${misc_stage[@]}; do
install_software_paru $SOFTWR
done
fi
### Install all of the nvidia drivers and dependencies ####
read -rep $'[\e[1;33mACTION\e[0m] - Would you like to install Nvidia Drivers? \033[31m[WARNING]\033[0m Skip this step if you are using WSL! (y,n)' INST
if [[ $INST == "Y" || $INST == "y" ]]; then
# nvidia drivers Stage
echo -e "$CNT - Nvidia Drivers Stage - Installing Nvidia Drivers, this may take a while..."
for SOFTWR in ${nvidia_drivers_stage[@]}; do
install_software_paru $SOFTWR
done
fi
### Copy Config Files ###
read -rep $'[\e[1;33mACTION\e[0m] - Would you like to copy config files? (y,n) ' CFG
if [[ $CFG == "Y" || $CFG == "y" ]]; then
echo -e "$CNT - Creating config files symobic links using stow..."
# create symlinks to dotfiles using stow
stow */ --verbose -t ~ && echo -e "$CNT - Linked config files." &>> $INSTLOG
# export environment variables from .zshenv
[ -f ~/.zshenv ] && source ~/.zshenv && echo -e "$CNT - Sourced .zshenv" &>> $INSTLOG
fi
### Copy Config Files ###
read -rep $'[\e[1;33mACTION\e[0m] - Would you like to run antidot (declutter your home directory)? (y,n) ' CFG
if [[ $CFG == "Y" || $CFG == "y" ]]; then
echo -e "$CNT - Decluttering home directory..."
antidot update &>> $INSTLOG
antidot clean &>> $INSTLOG
antidot init &>> $INSTLOG
fi
# Change default shell to zsh
chsh -s $(which zsh)
# setup complete
echo -e "$CNT - \033[36m SETUP COMPLETE, ENJOY YOUR NEW SUPERCHARGED DEVELOPER ENVIRONMENT!\033[0m\n\033[95mPLEASE RESTART YOUR TERMINAL TO COMPLETE SETUP\033[0m"