#!/bin/bash set -eu # Update dconf database after having put files in /etc/dconf/. dconf update # Configure timezone. TIMEZONE=Europe/Zurich echo "$TIMEZONE" > /etc/timezone ln -sf /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime # Install VS Code extensions. VSCODE_EXTENSIONS="ms-python.python ms-vscode.cpptools swissolyinfo.soicode" mkdir /etc/skel/.vscode chown nobody:nogroup /etc/skel/.vscode for ext in $VSCODE_EXTENSIONS; do runuser -u nobody -- code --user-data-dir=/tmp/vsc.tmp \ --extensions-dir=/etc/skel/.vscode/extensions \ --install-extension="$ext" done chown -R root:root /etc/skel/.vscode rm -rf /tmp/vsc.tmp # Enable codeblocks template. sed -i 's|// project wizards|RegisterWizard(wizProject, _T("soi"), _T("A SOI task"), _T("Console"));|' /usr/share/codeblocks/templates/wizard/config.script # Add a default keyring to avoid a prompt to create one when launching Chromium. mkdir -p /etc/skel/.local/share/keyrings/ chmod og= /etc/skel/.local/share/keyrings/ echo -n "Default_keyring" > /etc/skel/.local/share/keyrings/default cat > /etc/skel/.local/share/keyrings/Default_keyring.keyring <