Autoconfigure a fresh Debian install with optimal settings and packages.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

118 lines
4.9 KiB

echo "Creating temporary folder..."
mkdir -p "./tmp"
cd "./tmp"
echo "Installing fish, vim, vlc and thunderbird"
sudo apt update
sudo apt -y install fish vim vlc thunderbird unattended-upgrades
echo "Setting fish as default shell"
sudo chsh -s /usr/bin/fish $USER
echo "Installing GNOME Extensions"
sudo apt -y install gnome-shell-extension-disconnect-wifi gnome-shell-extension-dashtodock gnome-shell-extension-top-icons-plus gnome-shell-extension-move-clock
echo "Configuring GNOME"
gsettings set org.gnome.desktop.wm.preferences button-layout 'appmenu:minimize,maximize,close'
gsettings set org.gnome.desktop.interface show-battery-percentage 'true'
gsettings set org.gnome.desktop.interface clock-show-weekday 'true'
gsettings set org.gnome.desktop.interface clock-show-date 'true'
gsettings set org.gnome.desktop.calendar show-weekdate 'true'
echo "Setting GRUB_TIMEOUT to 1"
sudo sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=1/g' /etc/default/grub
sudo update-grub
echo "Installing Nordic"
mkdir -p ~/.themes
git clone ~/.themes/Nordic
git clone ~/.themes/Nordic-Polar
echo "Setting Nordic as selected theme"
gsettings set org.gnome.desktop.interface gtk-theme Nordic
gsettings set org.gnome.desktop.wm.preferences theme Nordic
echo "Removing Rhythmbox and Evolution"
sudo apt -y remove evolution rhythmbox
sudo apt -y autoremove
echo "Setup unattended-upgrades"
sudo sed -i 's|^\/\/ "origin=Debian,codename=${distro_codename}-updates";| "origin=Debian,codename=${distro_codename}-updates";|' $unatt_upgrades_path
sudo sed -i 's|^\/\/ "origin=Debian,codename=${distro_codename}-proposed-updates";| "origin=Debian,codename=${distro_codename}-proposed-updates";|' $unatt_upgrades_path
echo "Downloading Firefox"
# TODO: loc
wget -O firefox.tar.bz2 ""
echo "Unzipping Firefox"
tar xjf firefox.tar.bz2
echo "Moving Firefox to /opt/"
sudo mv firefox /opt/
echo "Adding Firefox to GNOME applications"
sudo mv ../assets/firefox/firefox.desktop /usr/share/applications/
echo "Removing Firefox ESR"
# TODO: Prevent apt from installing chromium, see #1
sudo apt -y remove firefox-esr
sudo apt -y autoremove
echo "Opening Firefox to create its configuration folder."
/opt/firefox/firefox -headless & >>./tmp/logfile 2>&1
sleep 6
pkill -f firefox
filename_default=$(grep '^Path=' "$path_profile_ini" | grep .default | sed 's/\x1b\[[0-9;]*[a-zA-Z]//g' | cut -d= -f2)
if [ ! -e "$path_user_js" ]; then
echo "Customize Firefox configuration"
echo 'user_pref("geo.enabled", false);' | tee -a $path_user_js
echo 'user_pref("browser.newtabpage.activity-stream.feeds.topsites", false);' | tee -a $path_user_js
echo 'user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);' | tee -a $path_user_js
echo 'user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);' | tee -a $path_user_js
echo 'user_pref("browser.startup.homepage", "");' | tee -a $path_user_js
echo 'user_pref("browser.urlbar.placeholderName", "DuckDuckGo");' | tee -a $path_user_js
echo 'user_pref("browser.urlbar.placeholderName.private", "DuckDuckGo");' | tee -a $path_user_js
echo 'user_pref("signon.rememberSignons", "false");' | tee -a $path_user_js
echo 'user_pref("app.shield.optoutstudies.enabled", "false");' | tee -a $path_user_js
echo 'user_pref("toolkit.telemetry.reportingpolicy.firstRun", "false");' | tee -a $path_user_js
echo 'user_pref("extensions.pocket.enabled", "false");' | tee -a $path_user_js
echo 'user_pref("privacy.trackingprotection.enabled", "true");' | tee -a $path_user_js
echo 'user_pref("privacy.trackingprotection.socialtracking.enabled", "true");' | tee -a $path_user_js
echo 'user_pref("privacy.trackingprotection.introCount", "20");' | tee -a $path_user_js
echo "Custom Firefox configuration already exists, no changes."
echo "Done."
echo "Left to do:"
echo "- Enable and configure gnome shell extensions"
echo "- Start Thunderbird, enable the menu bar and remove Lightning if exists"
echo "- Set VLC as default video app, set Firefox as default browser"
echo "- Install Grammalecte in Firefox, Thunderbird and LibreOffice"
echo "- Install Decentraleyes and uBlock Origin in Firefox"
echo "- If needed, install GNOME themes (Canta?)"
echo "- Remove GNOME junk games:"
echo "sudo apt-get purge gnome-2048 aisleriot atomix gnome-chess five-or-more hitori iagno gnome-klotski lightsoff gnome-mahjongg gnome-mines gnome-nibbles quadrapassel four-in-a-row gnome-robots gnome-sudoku swell-foop tali gnome-taquin gnome-tetravex"