diff options
-rwxr-xr-x | install.sh | 23 |
1 files changed, 12 insertions, 11 deletions
@@ -6,7 +6,7 @@ source deploy.conf | |||
6 | # Change apt sources to use https | 6 | # Change apt sources to use https |
7 | sed -i "s/http:/https:/" /etc/apt/sources.list | 7 | sed -i "s/http:/https:/" /etc/apt/sources.list |
8 | 8 | ||
9 | [ -z $BACKPORTS] && echo "deb https://deb.debian.org/debian/ bullseye-backports main" >> \ | 9 | [ ! -z $BACKPORTS ] && echo "deb https://deb.debian.org/debian/ bullseye-backports main" >> \ |
10 | /etc/apt/sources.list | 10 | /etc/apt/sources.list |
11 | 11 | ||
12 | # Update packages | 12 | # Update packages |
@@ -16,9 +16,9 @@ apt update -y && apt upgrade -y | |||
16 | sed -i "s/main/main contrib non-free/" /etc/apt/sources.list | 16 | sed -i "s/main/main contrib non-free/" /etc/apt/sources.list |
17 | apt update -y | 17 | apt update -y |
18 | 18 | ||
19 | [ -z $AMDCPU ] && apt install amd64-microcode -y | 19 | [ ! -z $AMDCPU ] && apt install amd64-microcode -y |
20 | [ -z $AMDGPU ] && apt install firmware-amd-graphics -y | 20 | [ ! -z $AMDGPU ] && apt install firmware-amd-graphics -y |
21 | [ -z $INTELCPU ] && apt install intel-microcode -y | 21 | [ ! -z $INTELCPU ] && apt install intel-microcode -y |
22 | 22 | ||
23 | # Remove contrib and non-free repos | 23 | # Remove contrib and non-free repos |
24 | sed -i "s/main contrib non-free/main/" /etc/apt/sources.list | 24 | sed -i "s/main contrib non-free/main/" /etc/apt/sources.list |
@@ -30,9 +30,10 @@ apt install "$(cat packages.custom)" -y | |||
30 | 30 | ||
31 | # For virtual machines | 31 | # For virtual machines |
32 | 32 | ||
33 | [ -z $VM ] && apt install spice-vdagent xserver-xorg-video-qxl -y | 33 | [ ! -z $VM ] && apt install spice-vdagent xserver-xorg-video-qxl -y |
34 | 34 | ||
35 | # basic configuration of ufw | 35 | # basic configuration of ufw |
36 | ufw enable | ||
36 | ufw default deny incoming | 37 | ufw default deny incoming |
37 | ufw default allow outgoing | 38 | ufw default allow outgoing |
38 | ufw default routed disabled | 39 | ufw default routed disabled |
@@ -50,12 +51,12 @@ passwd -l root | |||
50 | echo "backing up current home directory to ~/home_backup" | 51 | echo "backing up current home directory to ~/home_backup" |
51 | rsync -av $HOME/ $HOME/home_backup/ | 52 | rsync -av $HOME/ $HOME/home_backup/ |
52 | cd $HOME | 53 | cd $HOME |
53 | git clone https://git.chudnick.com/dotfiles.git | 54 | git clone https://git.chudnick.com/dotfiles |
54 | rsync --exclude .git/ --exclude LICENSE -av $HOME/dotfiles/ $HOME | 55 | rsync --exclude .git/ --exclude LICENSE -av $HOME/dotfiles/ $HOME |
55 | chsh -s $(which zsh) $USER | 56 | chsh -s $(which zsh) $USER |
56 | 57 | ||
57 | # DWM | 58 | # DWM |
58 | if [ -z $DWM ] then; | 59 | if [ ! -z $DWM ]; then |
59 | mkdir -p $HOME/.local/src/ | 60 | mkdir -p $HOME/.local/src/ |
60 | cd $HOME/.local/src/ | 61 | cd $HOME/.local/src/ |
61 | sudo apt install libx11-dev libx11-xcb-dev libxcb-res0-dev libxft-dev libxinerama-dev -y | 62 | sudo apt install libx11-dev libx11-xcb-dev libxcb-res0-dev libxft-dev libxinerama-dev -y |
@@ -66,7 +67,7 @@ if [ -z $DWM ] then; | |||
66 | fi | 67 | fi |
67 | 68 | ||
68 | # DWMBLOCKS | 69 | # DWMBLOCKS |
69 | if [ -z $DWMBLOCKS ] then; | 70 | if [ ! -z $DWMBLOCKS ]; then |
70 | mkdir -p $HOME/.local/src/ | 71 | mkdir -p $HOME/.local/src/ |
71 | cd $HOME/.local/src/ | 72 | cd $HOME/.local/src/ |
72 | sudo apt install libx11-dev -y | 73 | sudo apt install libx11-dev -y |
@@ -77,10 +78,10 @@ if [ -z $DWMBLOCKS ] then; | |||
77 | fi | 78 | fi |
78 | 79 | ||
79 | # SSH | 80 | # SSH |
80 | [ -z $CONFIG_SSH ] && ssh-keygen | 81 | [ ! -z $CONFIG_SSH ] && ssh-keygen |
81 | 82 | ||
82 | # SSH SERVER | 83 | # SSH SERVER |
83 | [ -z $CONFIG_SSH_SERVER ] && sudo apt install openssh-server -y && sudo ufw allow ssh | 84 | [ ! -z $CONFIG_SSH_SERVER ] && sudo apt install openssh-server -y && sudo ufw allow ssh |
84 | 85 | ||
85 | # GPG | 86 | # GPG |
86 | [ -z $CONFIG_GPG ] && gpg --full-gen-key | 87 | [ ! -z $CONFIG_GPG ] && gpg --full-gen-key |