diff options
author | Sam Chudnick <sam@chudnick.com> | 2021-12-26 15:26:09 -0500 |
---|---|---|
committer | Sam Chudnick <sam@chudnick.com> | 2021-12-26 15:26:09 -0500 |
commit | 3e7271645731d7bf51c1b186846861f9b80902b2 (patch) | |
tree | ca0cbb3af0efef3a89af7a4bfee956253eed4c57 | |
parent | f3bc97f94d47de36cfa3c3317fa683a6c2277043 (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.conf | 10 | ||||
-rw-r--r-- | install.sh | 65 |
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 | ||
@@ -6,22 +6,27 @@ 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 | [ -n $BACKPORTS ] && echo "deb https://deb.debian.org/debian/ bullseye-backports main" >> \ | ||
10 | /etc/apt/sources.list | ||
11 | |||
9 | # Update packages | 12 | # Update packages |
10 | apt update -y && apt upgrade -y | 13 | apt update -y && apt upgrade -y |
11 | 14 | ||
12 | if [ -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 | 16 | sed -i "s/main/main contrib non-free/" /etc/apt/sources.list |
14 | sed -i "s/main/main contrib non-free/" /etc/apt/sources.list | 17 | apt 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 | ||
21 | fi | ||
22 | 22 | ||
23 | # Install packages - do not install recommendations | 23 | # Remove contrib and non-free repos |
24 | apt install "$(cat packages)" -y | 24 | sed -i "s/main contrib non-free/main/" /etc/apt/sources.list |
25 | apt update -y | ||
26 | |||
27 | # Install packages | ||
28 | apt install "$(cat packages.base)" -y | ||
29 | apt install "$(cat packages.custom)" -y | ||
25 | 30 | ||
26 | # basic configuration of ufw | 31 | # basic configuration of ufw |
27 | ufw default deny incoming | 32 | ufw default deny incoming |
@@ -38,8 +43,40 @@ su $user | |||
38 | passwd -l root | 43 | passwd -l root |
39 | 44 | ||
40 | # Get and deploy dotfiles | 45 | # Get and deploy dotfiles |
46 | echo "backing up current home directory to ~/home_backup" | ||
47 | rsync -av $HOME/ $HOME/home_backup/ | ||
41 | cd $HOME | 48 | cd $HOME |
42 | git clone https://git.chudnick.com/dotfiles.git | 49 | git clone https://git.chudnick.com/dotfiles.git |
43 | cd dotfiles | 50 | rsync --exclude .git/ --exclude LICENSE -av $HOME/dotfiles/ $HOME |
44 | mv * ../ | 51 | chsh -s $(which zsh) $USER |
52 | |||
53 | # DWM | ||
54 | if [ -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 | ||
62 | fi | ||
63 | |||
64 | # DWMBLOCKS | ||
65 | if [ -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 | ||
73 | fi | ||
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 | ||