summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Chudnick <sam@chudnick.com>2021-12-26 15:26:09 -0500
committerSam Chudnick <sam@chudnick.com>2021-12-26 15:26:09 -0500
commit3e7271645731d7bf51c1b186846861f9b80902b2 (patch)
treeca0cbb3af0efef3a89af7a4bfee956253eed4c57
parentf3bc97f94d47de36cfa3c3317fa683a6c2277043 (diff)
Added several more options. Removed desktop option and replaced with hardware specific options. Use rsync to deploy files instead of mv.
-rw-r--r--deploy.conf10
-rw-r--r--install.sh65
2 files changed, 60 insertions, 15 deletions
diff --git a/deploy.conf b/deploy.conf
index 64c97ae..c40a12f 100644
--- a/deploy.conf
+++ b/deploy.conf
@@ -2,6 +2,14 @@
2# 2#
3# Configuration file for deployment script 3# Configuration file for deployment script
4 4
5#$DESKTOP=1 5#$BACKPORTS=1
6#$AMDCPU=1
7#$INTELCPU=1
8#$AMDGPU=1
6#$APTOPTS="--no-install-recommends" 9#$APTOPTS="--no-install-recommends"
10#$DWM=1
11#$DWMBLOCKS=1
12#$CONFIG_SSH=1
13#$CONFIG_SSH_SERVER=1
14#$CONFIG_GPG=1
7 15
diff --git a/install.sh b/install.sh
index c5ddd88..1844b4a 100644
--- a/install.sh
+++ b/install.sh
@@ -6,22 +6,27 @@ 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[ -n $BACKPORTS ] && echo "deb https://deb.debian.org/debian/ bullseye-backports main" >> \
10 /etc/apt/sources.list
11
9# Update packages 12# Update packages
10apt update -y && apt upgrade -y 13apt update -y && apt upgrade -y
11 14
12if [ -n "$DESKTOP" ] then; 15# Temporarily add contrib and non-free repos for necessary proprietary firmware and microcode
13 # Temporarily add contrib and non-free repos 16sed -i "s/main/main contrib non-free/" /etc/apt/sources.list
14 sed -i "s/main/main contrib non-free/" /etc/apt/sources.list 17apt update -y
15 apt update -y 18
16 # Install required non-free packages 19[ -n $AMDCPU ] && apt install amd64-microcode -y
17 apt install amd64-microcode firmware-amd-graphics 20[ -n $AMDGPU ] && apt install firmware-amd-graphics -y
18 # Remove non-free repos 21[ -n $INTELCPU ] && apt install intel-microcode -y
19 sed -i "s/main contrib non-free/main/" /etc/apt/sources.list
20 apt update -y
21fi
22 22
23# Install packages - do not install recommendations 23# Remove contrib and non-free repos
24apt install "$(cat packages)" -y 24sed -i "s/main contrib non-free/main/" /etc/apt/sources.list
25apt update -y
26
27# Install packages
28apt install "$(cat packages.base)" -y
29apt install "$(cat packages.custom)" -y
25 30
26# basic configuration of ufw 31# basic configuration of ufw
27ufw default deny incoming 32ufw default deny incoming
@@ -38,8 +43,40 @@ su $user
38passwd -l root 43passwd -l root
39 44
40# Get and deploy dotfiles 45# Get and deploy dotfiles
46echo "backing up current home directory to ~/home_backup"
47rsync -av $HOME/ $HOME/home_backup/
41cd $HOME 48cd $HOME
42git clone https://git.chudnick.com/dotfiles.git 49git clone https://git.chudnick.com/dotfiles.git
43cd dotfiles 50rsync --exclude .git/ --exclude LICENSE -av $HOME/dotfiles/ $HOME
44mv * ../ 51chsh -s $(which zsh) $USER
52
53# DWM
54if [ -n $DWM ] then;
55 mkdir -p $HOME/.local/src/
56 cd $HOME/.local/src/
57 sudo apt install libx11-dev libx11-xcb-dev libxcb-res0-dev libxft-dev libxinerama-dev -y
58 git clone https://git.chudnick.com/dwm
59 cd dwm
60 sudo make install
61 cd $HOME
62fi
63
64# DWMBLOCKS
65if [ -n $DWMBLOCKS ] then;
66 mkdir -p $HOME/.local/src/
67 cd $HOME/.local/src/
68 sudo apt install libx11-dev -y
69 git clone https://git.chudnick.com/dwmblocks
70 cd dwmblocks
71 sudo make install
72 cd $HOME
73fi
74
75# SSH
76[ -n $CONFIG_SSH ] && ssh-keygen
77
78# SSH SERVER
79[ -n $CONFIG_SSH_SERVER ] && sudo apt install openssh-server -y && sudo ufw allow ssh
45 80
81# GPG
82[ -n $CONFIG_GPG ] && gpg --full-gen-key