summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2021-12-26 16:17:39 -0500
committerSam Chudnick <sam@chudnick.com>2021-12-26 16:17:39 -0500
commitf585930413fd3a8b0beede193f42fa5f8eab5a00 (patch)
tree0a5c39312d2aa226b81d6568ce1560ddeebb5ff9
parent8e87c43237a52940c443b559a050d16e3ddcac9e (diff)
Fixed logic error on test commands. Added command to enable ufw. Fixed git clone link.
-rwxr-xr-xinstall.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/install.sh b/install.sh
index 6b6738d..03d93ad 100755
--- a/install.sh
+++ b/install.sh
@@ -6,7 +6,7 @@ source deploy.conf
6# Change apt sources to use https 6# Change apt sources to use https
7sed -i "s/http:/https:/" /etc/apt/sources.list 7sed -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
16sed -i "s/main/main contrib non-free/" /etc/apt/sources.list 16sed -i "s/main/main contrib non-free/" /etc/apt/sources.list
17apt update -y 17apt 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
24sed -i "s/main contrib non-free/main/" /etc/apt/sources.list 24sed -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
36ufw enable
36ufw default deny incoming 37ufw default deny incoming
37ufw default allow outgoing 38ufw default allow outgoing
38ufw default routed disabled 39ufw default routed disabled
@@ -50,12 +51,12 @@ passwd -l root
50echo "backing up current home directory to ~/home_backup" 51echo "backing up current home directory to ~/home_backup"
51rsync -av $HOME/ $HOME/home_backup/ 52rsync -av $HOME/ $HOME/home_backup/
52cd $HOME 53cd $HOME
53git clone https://git.chudnick.com/dotfiles.git 54git clone https://git.chudnick.com/dotfiles
54rsync --exclude .git/ --exclude LICENSE -av $HOME/dotfiles/ $HOME 55rsync --exclude .git/ --exclude LICENSE -av $HOME/dotfiles/ $HOME
55chsh -s $(which zsh) $USER 56chsh -s $(which zsh) $USER
56 57
57# DWM 58# DWM
58if [ -z $DWM ] then; 59if [ ! -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;
66fi 67fi
67 68
68# DWMBLOCKS 69# DWMBLOCKS
69if [ -z $DWMBLOCKS ] then; 70if [ ! -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;
77fi 78fi
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