|
@ -23,7 +23,7 @@ root_setup() { |
|
|
adduser root wheel || exit 1 |
|
|
adduser root wheel || exit 1 |
|
|
} |
|
|
} |
|
|
installdoas() { |
|
|
installdoas() { |
|
|
apk add doas |
|
|
|
|
|
|
|
|
apk add doas alpine-conf |
|
|
echo "permit nopass :wheel" >> /etc/doas.d/doas.conf |
|
|
echo "permit nopass :wheel" >> /etc/doas.d/doas.conf |
|
|
} |
|
|
} |
|
|
if test -z "$DOCKERBUILD"; then |
|
|
if test -z "$DOCKERBUILD"; then |
|
@ -43,12 +43,14 @@ user_setup() { |
|
|
Options: |
|
|
Options: |
|
|
|
|
|
|
|
|
-G,--graphical install xorg and wm |
|
|
-G,--graphical install xorg and wm |
|
|
|
|
|
-N,--nvim install neovim |
|
|
-C,--cp install competitive programming scripts |
|
|
-C,--cp install competitive programming scripts |
|
|
EOF |
|
|
EOF |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
GRAPHICAL= |
|
|
GRAPHICAL= |
|
|
CP= |
|
|
CP= |
|
|
|
|
|
NVIM= |
|
|
while test $# -ne 0; do |
|
|
while test $# -ne 0; do |
|
|
case $1 in |
|
|
case $1 in |
|
|
-G|--graphical) |
|
|
-G|--graphical) |
|
@ -57,6 +59,9 @@ EOF |
|
|
-C|--cp) |
|
|
-C|--cp) |
|
|
CP=1 |
|
|
CP=1 |
|
|
;; |
|
|
;; |
|
|
|
|
|
-N|--nvim) |
|
|
|
|
|
NVIM=1 |
|
|
|
|
|
;; |
|
|
*) |
|
|
*) |
|
|
echo "invalid option $1" |
|
|
echo "invalid option $1" |
|
|
help_text |
|
|
help_text |
|
@ -73,15 +78,35 @@ EOF |
|
|
|
|
|
|
|
|
dev() { |
|
|
dev() { |
|
|
echo "Developer tools..." |
|
|
echo "Developer tools..." |
|
|
doas apk add git make python3 nodejs npm go cargo g++ gcc curl bash shadow || exit 1 |
|
|
|
|
|
|
|
|
doas apk add git make python3 nodejs npm go g++ gcc curl bash shadow || exit 1 |
|
|
|
|
|
if ! test -z "$NVIM"; then |
|
|
|
|
|
doas apk add cargo |
|
|
|
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sysinfo() { |
|
|
sysinfo() { |
|
|
echo "Dylan Araps scripts" |
|
|
echo "Dylan Araps scripts" |
|
|
doas apk add neofetch pfetch fff |
|
|
|
|
|
|
|
|
cd "$HOME" || exit 1; |
|
|
|
|
|
mkdir -p repos |
|
|
|
|
|
git clone https://github.com/dylanaraps/pfetch "$HOME/repos/pfetch" |
|
|
|
|
|
git clone https://github.com/dylanaraps/neofetch "$HOME/repos/neofetch" |
|
|
|
|
|
git clone https://github.com/dylanaraps/fff "$HOME/repos/fff" |
|
|
|
|
|
|
|
|
|
|
|
cd "$HOME/repos/pfetch" || exit 1; |
|
|
|
|
|
doas make install || exit 2; |
|
|
|
|
|
cd "$HOME" || exit 1; |
|
|
|
|
|
|
|
|
|
|
|
cd "$HOME/repos/neofetch" || exit 1; |
|
|
|
|
|
doas make install || exit 2; |
|
|
|
|
|
cd "$HOME" || exit 1; |
|
|
|
|
|
|
|
|
|
|
|
cd "$HOME/repos/fff" || exit 1; |
|
|
|
|
|
doas make install || exit 2; |
|
|
|
|
|
cd "$HOME" || exit 1; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dotfiles() { |
|
|
dotfiles() { |
|
|
echo "Adding zsh and tmux configs" |
|
|
echo "Adding zsh and tmux configs" |
|
|
# zsh plugins |
|
|
# zsh plugins |
|
@ -118,7 +143,7 @@ EOF |
|
|
|
|
|
|
|
|
vimconfigs() { |
|
|
vimconfigs() { |
|
|
doas apk add vim |
|
|
doas apk add vim |
|
|
wget https://git.junickim.me/junikimm717/vim2023/raw/branch/master/lsp.vimrc -o .vimrc |
|
|
|
|
|
|
|
|
wget https://git.junickim.me/junikimm717/vim2023/raw/branch/master/lsp.vimrc -O .vimrc |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
competitiveprogramming() { |
|
|
competitiveprogramming() { |
|
@ -130,16 +155,24 @@ EOF |
|
|
graphical() { |
|
|
graphical() { |
|
|
# xorg and drivers |
|
|
# xorg and drivers |
|
|
doas setup-xorg-base |
|
|
doas setup-xorg-base |
|
|
doas apk add xf86-video-qxl mesa-egl |
|
|
|
|
|
doas apk add xf86-input-keyboard xf86-input-mouse xf86-input-evdev |
|
|
|
|
|
|
|
|
doas apk add xf86-video-qxl mesa-egl xrandr |
|
|
|
|
|
doas apk add xf86-input-evdev |
|
|
|
|
|
|
|
|
# wm applications |
|
|
# wm applications |
|
|
doas apk add i3wm nitrogen alacritty polybar i3lock |
|
|
|
|
|
|
|
|
doas apk add i3wm alacritty polybar i3lock feh |
|
|
|
|
|
|
|
|
# fonts |
|
|
# fonts |
|
|
doas apk add font-jetbrains-mono-nerd font-siji terminus-font ttf-inconsolata ttf-dejavu font-bitstream-* font-noto font-noto-cjk ttf-font-awesome font-noto-extra |
|
|
|
|
|
|
|
|
doas apk add font-jetbrains-mono-nerd terminus-font ttf-inconsolata ttf-dejavu font-noto font-noto-cjk ttf-font-awesome font-noto-extra |
|
|
doas apk add firefox-esr |
|
|
doas apk add firefox-esr |
|
|
|
|
|
|
|
|
|
|
|
mkdir -p "$HOME/repos/siji" |
|
|
|
|
|
cd "$HOME/repos/siji" || exit 1 |
|
|
|
|
|
curl -LJO https://github.com/fauno/siji/archive/master.tar.gz || exit 1 |
|
|
|
|
|
tar -xzvf ./siji-master.tar.gz || exit 1 |
|
|
|
|
|
mkdir -p "$HOME/.local/share/fonts" || exit 1 |
|
|
|
|
|
cp ./siji-master/ttf/siji.ttf "$HOME/.local/share/fonts/" || exit 1 |
|
|
|
|
|
fc-cache -rv |
|
|
|
|
|
|
|
|
mkdir -p "$HOME/.config/polybar" || exit 1 |
|
|
mkdir -p "$HOME/.config/polybar" || exit 1 |
|
|
mkdir -p "$HOME/.config/i3" || exit 1 |
|
|
mkdir -p "$HOME/.config/i3" || exit 1 |
|
|
mkdir -p "$HOME/.config/picom" || exit 1 |
|
|
mkdir -p "$HOME/.config/picom" || exit 1 |
|
@ -148,7 +181,10 @@ EOF |
|
|
cp "$DIR/dots/picom.conf" "$HOME/.config/picom/picom.conf" || exit 1 |
|
|
cp "$DIR/dots/picom.conf" "$HOME/.config/picom/picom.conf" || exit 1 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
(dev && sysinfo && dotfiles && vimconfigs && neovim) || exit 1 |
|
|
|
|
|
|
|
|
(dev && sysinfo && dotfiles && vimconfigs) || exit 1 |
|
|
|
|
|
if ! test -z "$NVIM"; then |
|
|
|
|
|
neovim || exit 1 |
|
|
|
|
|
fi |
|
|
if ! test -z "$CP"; then |
|
|
if ! test -z "$CP"; then |
|
|
competitiveprogramming || exit 1 |
|
|
competitiveprogramming || exit 1 |
|
|
fi |
|
|
fi |
|
|