|
|
|
@ -6,8 +6,8 @@
|
|
|
|
|
|
|
|
|
|
### OPTIONS AND VARIABLES ###
|
|
|
|
|
|
|
|
|
|
dotfilesrepo="https://github.com/lukesmithxyz/voidrice.git"
|
|
|
|
|
progsfile="https://raw.githubusercontent.com/LukeSmithxyz/LARBS/master/static/progs.csv"
|
|
|
|
|
dotfilesrepo="https://github.com/filippo-ferrari/voidrice.git"
|
|
|
|
|
progsfile="https://raw.githubusercontent.com/filippo-ferrari/LARBS/master/static/progs.csv"
|
|
|
|
|
aurhelper="yay"
|
|
|
|
|
repobranch="master"
|
|
|
|
|
export TERM=ansi
|
|
|
|
@ -26,7 +26,7 @@ error() {
|
|
|
|
|
|
|
|
|
|
welcomemsg() {
|
|
|
|
|
whiptail --title "Welcome!" \
|
|
|
|
|
--msgbox "Welcome to Luke's Auto-Rice Bootstrapping Script!\\n\\nThis script will automatically install a fully-featured Linux desktop, which I use as my main machine.\\n\\n-Luke" 10 60
|
|
|
|
|
--msgbox "Welcome to F's version of Luke's Auto-Rice Bootstrapping Script!\\n\\nThis script will automatically install a fully-featured Linux desktop, which I use as my main machine.\\n\\n-Luke" 10 60
|
|
|
|
|
|
|
|
|
|
whiptail --title "Important Note!" --yes-button "All ready!" \
|
|
|
|
|
--no-button "Return..." \
|
|
|
|
@ -84,25 +84,12 @@ refreshkeys() {
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
whiptail --infobox "Enabling Arch Repositories for more a more extensive software collection..." 7 40
|
|
|
|
|
if ! grep -q "^\[universe\]" /etc/pacman.conf; then
|
|
|
|
|
echo "[universe]
|
|
|
|
|
Server = https://universe.artixlinux.org/\$arch
|
|
|
|
|
Server = https://mirror1.artixlinux.org/universe/\$arch
|
|
|
|
|
Server = https://mirror.pascalpuffke.de/artix-universe/\$arch
|
|
|
|
|
Server = https://mirrors.qontinuum.space/artixlinux-universe/\$arch
|
|
|
|
|
Server = https://mirror1.cl.netactuate.com/artix/universe/\$arch
|
|
|
|
|
Server = https://ftp.crifo.org/artix-universe/\$arch
|
|
|
|
|
Server = https://artix.sakamoto.pl/universe/\$arch" >>/etc/pacman.conf
|
|
|
|
|
pacman -Sy --noconfirm >/dev/null 2>&1
|
|
|
|
|
fi
|
|
|
|
|
pacman --noconfirm --needed -S \
|
|
|
|
|
artix-keyring artix-archlinux-support >/dev/null 2>&1
|
|
|
|
|
for repo in extra community; do
|
|
|
|
|
grep -q "^\[$repo\]" /etc/pacman.conf ||
|
|
|
|
|
echo "[$repo]
|
|
|
|
|
grep -q "^\[extra\]" /etc/pacman.conf ||
|
|
|
|
|
echo "[extra]
|
|
|
|
|
Include = /etc/pacman.d/mirrorlist-arch" >>/etc/pacman.conf
|
|
|
|
|
done
|
|
|
|
|
pacman -Sy >/dev/null 2>&1
|
|
|
|
|
pacman -Sy --noconfirm >/dev/null 2>&1
|
|
|
|
|
pacman-key --populate archlinux >/dev/null 2>&1
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
@ -238,14 +225,19 @@ installffaddons(){
|
|
|
|
|
IFS=' '
|
|
|
|
|
sudo -u "$name" mkdir -p "$pdir/extensions/"
|
|
|
|
|
for addon in $addonlist; do
|
|
|
|
|
addonurl="$(curl --silent "https://addons.mozilla.org/en-US/firefox/addon/${addon}/" | grep -o 'https://addons.mozilla.org/firefox/downloads/file/[^"]*')"
|
|
|
|
|
if [ "$addon" = "ublock-origin" ]; then
|
|
|
|
|
addonurl="$(curl -sL https://api.github.com/repos/gorhill/uBlock/releases/latest | grep -E 'browser_download_url.*\.firefox\.xpi' | cut -d '"' -f 4)"
|
|
|
|
|
else
|
|
|
|
|
addonurl="$(curl --silent "https://addons.mozilla.org/en-US/firefox/addon/${addon}/" | grep -o 'https://addons.mozilla.org/firefox/downloads/file/[^"]*')"
|
|
|
|
|
fi
|
|
|
|
|
file="${addonurl##*/}"
|
|
|
|
|
sudo -u "$name" curl -LOs "$addonurl" > "$addontmp/$file"
|
|
|
|
|
id="$(unzip -p "$file" manifest.json | grep "\"id\"")"
|
|
|
|
|
id="${id%\"*}"
|
|
|
|
|
id="${id##*\"}"
|
|
|
|
|
sudo -u "$name" mv "$file" "$pdir/extensions/$id.xpi"
|
|
|
|
|
mv "$file" "$pdir/extensions/$id.xpi"
|
|
|
|
|
done
|
|
|
|
|
chown -R "$name:$name" "$pdir/extensions"
|
|
|
|
|
# Fix a Vim Vixen bug with dark mode not fixed on upstream:
|
|
|
|
|
sudo -u "$name" mkdir -p "$pdir/chrome"
|
|
|
|
|
[ ! -f "$pdir/chrome/userContent.css" ] && sudo -u "$name" echo ".vimvixen-console-frame { color-scheme: light !important; }
|
|
|
|
@ -364,7 +356,7 @@ profilesini="$browserdir/profiles.ini"
|
|
|
|
|
# Start librewolf headless so it generates a profile. Then get that profile in a variable.
|
|
|
|
|
sudo -u "$name" librewolf --headless >/dev/null 2>&1 &
|
|
|
|
|
sleep 1
|
|
|
|
|
profile="$(sed -n "/Default=.*.default-release/ s/.*=//p" "$profilesini")"
|
|
|
|
|
profile="$(sed -n "/Default=.*.default-default/ s/.*=//p" "$profilesini")"
|
|
|
|
|
pdir="$browserdir/$profile"
|
|
|
|
|
|
|
|
|
|
[ -d "$pdir" ] && makeuserjs
|
|
|
|
@ -377,7 +369,7 @@ pkill -u "$name" librewolf
|
|
|
|
|
# Allow wheel users to sudo with password and allow several system commands
|
|
|
|
|
# (like `shutdown` to run without password).
|
|
|
|
|
echo "%wheel ALL=(ALL:ALL) ALL" >/etc/sudoers.d/00-larbs-wheel-can-sudo
|
|
|
|
|
echo "%wheel ALL=(ALL:ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/systemctl suspend,/usr/bin/wifi-menu,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys,/usr/bin/pacman -Syyuw --noconfirm,/usr/bin/pacman -S -u -y --config /etc/pacman.conf --,/usr/bin/pacman -S -y -u --config /etc/pacman.conf --" >/etc/sudoers.d/01-larbs-cmds-without-password
|
|
|
|
|
echo "%wheel ALL=(ALL:ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/systemctl suspend,/usr/bin/wifi-menu,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys,/usr/bin/pacman -Syyuw --noconfirm,/usr/bin/pacman -S -y --config /etc/pacman.conf --,/usr/bin/pacman -S -y -u --config /etc/pacman.conf --" >/etc/sudoers.d/01-larbs-cmds-without-password
|
|
|
|
|
echo "Defaults editor=/usr/bin/nvim" >/etc/sudoers.d/02-larbs-visudo-editor
|
|
|
|
|
mkdir -p /etc/sysctl.d
|
|
|
|
|
echo "kernel.dmesg_restrict = 0" > /etc/sysctl.d/dmesg.conf
|
|
|
|
|