aboutsummaryrefslogtreecommitdiff
path: root/share/provision
diff options
context:
space:
mode:
Diffstat (limited to 'share/provision')
-rwxr-xr-xshare/provision/debian/basic5
-rwxr-xr-xshare/provision/debian/desktop-basic20
-rwxr-xr-xshare/provision/debian/messenger6
-rwxr-xr-xshare/provision/debian/tor-browser2
-rwxr-xr-xshare/provision/debian/web-basic4
-rwxr-xr-xshare/provision/debian/webserver8
6 files changed, 38 insertions, 7 deletions
diff --git a/share/provision/debian/basic b/share/provision/debian/basic
index 5344df3..cfd2122 100755
--- a/share/provision/debian/basic
+++ b/share/provision/debian/basic
@@ -61,6 +61,11 @@ sudo apps/trashman/trashman install grub-serial-console
sudo sysctl kernel.unprivileged_bpf_disabled=1
echo "kernel.unprivileged_bpf_disabled=1" | sudo tee /etc/sysctl.d/kernel.unprivileged_bpf_disabled.conf > /dev/null
+# Swappiness
+# Decrease system swappiness (default is 60), since this is a virtual machine
+sudo sysctl vm.swappiness=10
+echo "vm.swappiness = 10" | sudo tee /etc/sysctl.d/vm.swappiness.conf > /dev/null
+
# Configuring APT
sudo apt-get update
$APT_INSTALL apt-transport-https || exit 1
diff --git a/share/provision/debian/desktop-basic b/share/provision/debian/desktop-basic
index 30c9ea3..2eeaf5d 100755
--- a/share/provision/debian/desktop-basic
+++ b/share/provision/debian/desktop-basic
@@ -46,10 +46,11 @@ apps/metadot/metadot deps-bundle desktop-basic
# Additional packages
echo "Installing additional desktop-basic packages..."
-$APT_INSTALL xpra lightdm firejail xsel tigervnc-viewer
+$APT_INSTALL xpra lightdm firejail xsel tigervnc-viewer alsa-utils pulseaudio
-# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=861744
-$APT_INSTALL torbrowser-launcher alsa-utils pulseaudio
+# Tor Browser launcher
+# Deprecated in favor of https://git.fluxo.info/utils-tor
+#$APT_INSTALL torbrowser-launcher
# System-wide configuration
sudo cp $DIRNAME/files/desktop-basic/etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
@@ -76,6 +77,13 @@ fi
# User configuration
mkdir -p $HOME/.custom
-if [ ! -e "$HOME/.custom/xsession" ]; then
- cp $DIRNAME/files/desktop-basic/home/user/.custom/xsession $HOME/.custom/xsession
-fi
+# Only install the custom xsession config if it does not exist
+#if [ ! -e "$HOME/.custom/xsession" ]; then
+# cp $DIRNAME/files/desktop-basic/home/user/.custom/xsession $HOME/.custom/xsession
+#fi
+
+# Always install the custom xsession config if it does not exist
+#
+# VMs with custom xsession procedures should use an additional
+# $HOME/.custom/xsession-$HOSTNAME
+cp $DIRNAME/files/desktop-basic/home/user/.custom/xsession $HOME/.custom/xsession
diff --git a/share/provision/debian/messenger b/share/provision/debian/messenger
index bdd8f7e..9b63a21 100755
--- a/share/provision/debian/messenger
+++ b/share/provision/debian/messenger
@@ -25,6 +25,7 @@ HOSTNAME="$1"
DOMAIN="$2"
MIRROR="$3"
APT_INSTALL="sudo LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
+CONFIG='PROGRAMS="signal-desktop"'
# Provision the basic stuff
$DIRNAME/desktop-basic $HOSTNAME $DOMAIN $MIRROR
@@ -37,3 +38,8 @@ sudo trashman install signal-desktop
# Install Gajim
$APT_INSTALL gajim gajim-omemo
+
+# Startup
+if ! grep -q "^$CONFIG$" $HOME/.custom/xsession-${HOSTNAME} 2> /dev/null; then
+ echo "$CONFIG" >> $HOME/.custom/xsession-${HOSTNAME}
+fi
diff --git a/share/provision/debian/tor-browser b/share/provision/debian/tor-browser
index 05218cd..baf231d 100755
--- a/share/provision/debian/tor-browser
+++ b/share/provision/debian/tor-browser
@@ -30,7 +30,7 @@ APT_INSTALL="sudo LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
$DIRNAME/web-basic $HOSTNAME $DOMAIN $MIRROR
# Use a stacked window manager to reduce browser fingerprinting
-$DIRNAME/openbox
+$DIRNAME/openbox $HOSTNAME $DOMAIN $MIRROR
# Install Tor Browser
# No need to install tor-browser during provision, as the tor-browser script
diff --git a/share/provision/debian/web-basic b/share/provision/debian/web-basic
index 2d3c06d..8956a80 100755
--- a/share/provision/debian/web-basic
+++ b/share/provision/debian/web-basic
@@ -29,6 +29,10 @@ APT_INSTALL="sudo LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
# Provision the basic stuff
$DIRNAME/desktop-basic $HOSTNAME $DOMAIN $MIRROR
+# Aditional metadot modules
+apps/metadot/metadot load-bundle web-basic
+apps/metadot/metadot deps-bundle web-basic
+
# Additional packages
echo "Installing additional web packages..."
$APT_INSTALL firefox-esr chromium wget
diff --git a/share/provision/debian/webserver b/share/provision/debian/webserver
index 650452f..9098007 100755
--- a/share/provision/debian/webserver
+++ b/share/provision/debian/webserver
@@ -18,5 +18,13 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+# Parameters
+DIRNAME="`dirname $0`"
+BASENAME="`basename $0`"
+HOSTNAME="$1"
+DOMAIN="$2"
+MIRROR="$3"
+
+# Run
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean
sudo apt-get install -y apache2