summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--deploy.conf7
-rw-r--r--install.sh45
3 files changed, 53 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f9ced93
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
packages
diff --git a/deploy.conf b/deploy.conf
new file mode 100644
index 0000000..64c97ae
--- /dev/null
+++ b/deploy.conf
@@ -0,0 +1,7 @@
1#!/bin/sh
2#
3# Configuration file for deployment script
4
5#$DESKTOP=1
6#$APTOPTS="--no-install-recommends"
7
diff --git a/install.sh b/install.sh
new file mode 100644
index 0000000..c5ddd88
--- /dev/null
+++ b/install.sh
@@ -0,0 +1,45 @@
1#!/bin/sh
2
3# source configuration file
4source deploy.conf
5
6# Change apt sources to use https
7sed -i "s/http/https/" /etc/apt/sources.list
8
9# Update packages
10apt update -y && apt upgrade -y
11
12if [ -n "$DESKTOP" ] then;
13 # Temporarily add contrib and non-free repos
14 sed -i "s/main/main contrib non-free/" /etc/apt/sources.list
15 apt update -y
16 # Install required non-free packages
17 apt install amd64-microcode firmware-amd-graphics
18 # Remove non-free repos
19 sed -i "s/main contrib non-free/main/" /etc/apt/sources.list
20 apt update -y
21fi
22
23# Install packages - do not install recommendations
24apt install "$(cat packages)" -y
25
26# basic configuration of ufw
27ufw default deny incoming
28ufw default allow outgoing
29ufw default routed disabled
30ufw reload
31
32# add user to sudo group
33user=$(cat /etc/passwd | grep 1000 | cut -d ':' -f 1)
34usermod -aG sudo $user
35
36# Switch to standard user and disable root password
37su $user
38passwd -l root
39
40# Get and deploy dotfiles
41cd $HOME
42git clone https://git.chudnick.com/dotfiles.git
43cd dotfiles
44mv * ../
45