Files
patronageos/config/filesystem_chroot_install.sh
2025-12-09 22:06:11 -07:00

50 lines
2.0 KiB
Bash

#add sources list for noble.
set -e
echo "deb https://archive.ubuntu.com/ubuntu questing main restricted universe multiverse" > /etc/apt/sources.list
echo "deb https://archive.ubuntu.com/ubuntu questing-updates main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb https://archive.ubuntu.com/ubuntu questing-backports main restricted universe multiverse" >> /etc/apt/sources.list
echo "deb https://security.ubuntu.com/ubuntu questing-security main restricted universe multiverse" >> /etc/apt/sources.list
apt update
apt upgrade -y
#set locale
locale-gen "en_US.UTF-8"
echo "LANG=en_US.UTF-8" > /etc/default/locale
#install base system packages
apt install -y --install-recommends --install-suggests --reinstall systemd
apt install -y --no-install-recommends gnome-core
apt install -y git curl flatpak systemd-resolved ufw nano htop ipset lm-sensors net-tools iputils-ping fish python3-bpfcc python3-pip bpfcc-tools gnome-shell-extension-ubuntu-dock gnome-shell-extension-ubuntu-tiling-assistant ffmpeg vlc
pip install --break-system-packages dnslib psutil
#add setuid for some applications
chmod u+s /usr/bin/bwrap
chmod u+s /usr/bin/ping
#enable services
systemctl enable systemd-resolved
systemctl enable systemd-networkd
#ui changes
gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
#run echo "permit persist :sudo as root" >> /etc/doas.conf
#create the default user
useradd -m -s /bin/bash ubuntu
usermod -a -G sudo ubuntu
yes defaultpass | passwd ubuntu
#install flatpak apps
flatpak remote-add flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install --system --noninteractive flathub org.keepassxc.KeePassXC
#install brave browser
curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg
curl -fsSLo /etc/apt/sources.list.d/brave-browser-release.sources https://brave-browser-apt-release.s3.brave.com/brave-browser.sources
apt update
apt install -y brave-browser