home · contact · privacy
Improve and expand post-install script.
[config] / jessie_start.sh
index 74044600838c62eb0009951661a76ea92a655181..5d6f84ff478075061c3dd66e466d39d27077480d 100755 (executable)
@@ -27,6 +27,17 @@ dhclient eth0
 apt-get update
 apt-get -y dist-upgrade
 
+# Power management as per <http://thinkwiki.de/TLP_-_Linux_Stromsparen>.
+echo '' >> /etc/apt/sources.list
+echo 'deb http://repo.linrunner.de/debian jessie main' >> /etc/apt/sources.list
+apt-key adv --keyserver pool.sks-keyservers.net --recv-keys CD4E8809
+apt-get update
+apt-get -y install linux-headers-amd64 tlp tp-smapi-dkms
+sed -i 's/^#START_CHARGE_THRESH_BAT0/START_CHARGE_THRESH_BAT0=10 #START_CHARGE_THRESH_BAT0/' /etc/default/tlp
+sed -i 's/^#STOP_CHARGE_THRESH_BAT0/START_CHARGE_THRESH_BAT0=10 #STOP_CHARGE_THRESH_BAT0/' /etc/default/tlp
+sed -i 's/^#DEVICES_TO_DISABLE_ON_STARTUP/DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan" #DEVICES_TO_DISABLE_ON_STARTUP/' /etc/default/tlp
+tlp start
+
 # Don't clear boot messages on start up.
 sed -i 's/^TTYVTDisallocate=yes$/TTYVTDisallocate=no/g' /etc/systemd/system/getty.target.wants/getty\@tty1.service
 
@@ -47,14 +58,25 @@ apt-get -y install git
 git clone http://github.com/plomlompom/config
 config/symlink.sh
 
-# Add user.
+# Add user. Remove old user's config/ if it exists.
 useradd -m -s /bin/bash plom
-cp -R config /home/plom/
-chown -R plom /home/plom/config
+rm -rf /home/plom/config
+su - plom -c 'git clone http://github.com/plomlompom/config /home/plom/config'
 su plom -c /home/plom/config/symlink.sh
 
 # Set up window system.
-apt-get -y install xserver-xorg xinit i3 i3status
+apt-get -y install xserver-xorg xinit xterm i3 i3status dmenu
+
+# Set up manuals.
+apt-get -y install man-db manpages less
+
+# Set up editor.
+apt-get -y install vim
+mkdir -p .vimbackups
+su plom -c 'mkdir -p /home/plom/.vimbackups/'
+
+# Set up pentadactyl. 
+apt-get -y install xul-ext-pentadactyl
 
 # Clean up.
 rm jessie_start.sh