[PATCHSET 1/2] Merge end01 into origin

This commit is contained in:
theVakhovskeIsTaken 2023-08-20 16:44:32 +00:00
parent fb248d8335
commit 2dad3b7ce9
17 changed files with 78 additions and 107 deletions

View File

@ -0,0 +1,22 @@
#!/bin/bash
if (( UID != 0 )); then
echo "$0: needs to run as root!" 1>&2
exit 1
fi
for device in /sys/class/drm/card?/device; do
if [[ -e "$device"/pp_power_profile_mode ]]; then
echo manual > "$device"/power_dpm_force_performance_level
echo 1 > "$device"/pp_power_profile_mode
# The other power profile modes are:
# 0 = BOOTUP_DEFAULT
# 1 = 3D_FULL_SCREEN
# 2 = POWER_SAVING
# 3 = VIDEO
# 4 = VR
# 5 = COMPUTE
fi
done

View File

@ -0,0 +1 @@
/etc/systemd/system/amd-perf-fix.service

View File

@ -51,9 +51,10 @@ xargs -0 zenity --list --width=600 --height=512 --title="Select disk" --text="Se
exit 1
fi
echo "\nChoose your partitioning type:"
install=$(zenity --list --title="Choose your installation type:" --column="Type" --column="Name" 1 "Erase entire drive" \2 "Install alongside existing OS/Partition (Requires at least 50 GB of free space from the end)" --width=700 --height=220)
install=$(zenity --list --title="Choose your installation type:" --column="Type" --column="Name" 1 "Erase entire drive" \2 "Install alongside existing OS/Partition (Requires at least 50 GB of FREE and UNFORMATTED space from the end)" --width=700 --height=220)
if [[ -n "$(sudo blkid | grep holo-home | cut -d ':' -f 1 | head -n 1)" ]]; then
HOME_REUSE_TYPE=$(zenity --list --title="Warning" --text="HoloISO home partition was detected at $(sudo blkid | grep holo-home | cut -d ':' -f 1 | head -n 1). Please select an appropriate action below:" --column="Type" --column="Name" 1 "Format it and start over" \2 "Reuse partition" --width=500 --height=220)
if [[ "$HOME_REUSE_TYPE" == "2"]]; then
mkdir -p /tmp/home
mount $(sudo blkid | grep holo-home | cut -d ':' -f 1 | head -n 1) /tmp/home
mkdir -p /tmp/rootpart
@ -92,6 +93,7 @@ xargs -0 zenity --list --width=600 --height=512 --title="Select disk" --text="Se
umount -l $(sudo blkid | grep holo-home | cut -d ':' -f 1 | head -n 1)
umount -l $(sudo blkid | grep holo-root | cut -d ':' -f 1 | head -n 1)
fi
fi
fi
# Setup password for root
while true; do
@ -110,7 +112,7 @@ xargs -0 zenity --list --width=600 --height=512 --title="Select disk" --text="Se
done
# Create user
NAME_REGEX="^[a-z][-a-z0-9_]*\$"
if [ -z $MIGRATEDINSTALL ]; then
if [[ "$MIGRATEDINSTALL" -ne "1" ]]; then
while true; do
HOLOUSER=$(zenity --entry --title="Account creation" --text "Enter username for this installation:")
if [ $HOLOUSER = "root" ]; then
@ -311,11 +313,11 @@ base_os_install() {
echo -e "${ROOTPASS}\n${ROOTPASS}" | arch-chroot ${HOLO_INSTALL_DIR} passwd root
arch-chroot ${HOLO_INSTALL_DIR} useradd --create-home ${HOLOUSER}
echo -e "${HOLOPASS}\n${HOLOPASS}" | arch-chroot ${HOLO_INSTALL_DIR} passwd ${HOLOUSER}
echo "${HOLOUSER} ALL=(ALL:ALL) ALL" > ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER}
echo "${HOLOUSER} ALL=(ALL) ALL" > ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER}
chmod 0440 ${HOLO_INSTALL_DIR}/etc/sudoers.d/${HOLOUSER}
echo "127.0.1.1 ${HOLOHOSTNAME}" >> ${HOLO_INSTALL_DIR}/etc/hosts
sleep 1
clear
clear
echo "\nInstalling bootloader..."
mkdir -p ${HOLO_INSTALL_DIR}/boot/efi
@ -327,17 +329,25 @@ base_os_install() {
clear
}
full_install() {
if [[ "${GAMEPAD_DRV}" == "1" ]]; then
echo "You're running this on Anbernic Win600. A suitable gamepad driver will be installed."
arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs_addon | grep win600-xpad-dkms)
fi
if [[ "${FIRMWARE_INSTALL}" == "1" ]]; then
echo "You're running this on a Steam Deck. linux-firmware-neptune will be installed to ensure maximum kernel-side compatibility."
arch-chroot ${HOLO_INSTALL_DIR} pacman -Rdd --noconfirm linux-firmware
arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs_addon | grep linux-firmware-neptune)
arch-chroot ${HOLO_INSTALL_DIR} mkinitcpio -P
fi
if [[ -n "$(lspci -nn | grep -i vga | grep -Po "10de:[a-z0-9]{4}")" ]]; then
echo "NVIDIA GPU detected. Installing NVIDIA Drivers."
arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs/nv | grep pkg.tar.zst)
arch-chroot ${HOLO_INSTALL_DIR} mkinitcpio -P
fi
mv /etc/holoinstall/post_install/amd-perf-fix "${HOLO_INSTALL_DIR}"/usr/bin/amd-perf-fix
chmod +x "${HOLO_INSTALL_DIR}"/usr/bin/amd-perf-fix
# if [[ -n "$(lspci -nn | grep -i vga | grep -Po "10de:[a-z0-9]{4}")" ]]; then
# echo "NVIDIA GPU detected. Installing NVIDIA Drivers."
# arch-chroot ${HOLO_INSTALL_DIR} pacman -U --noconfirm $(find /etc/holoinstall/post_install/pkgs/nv | grep pkg.tar.zst)
# arch-chroot ${HOLO_INSTALL_DIR} mkinitcpio -P
# fi
echo "\nConfiguring Steam Deck UI by default..."
ln -s /usr/share/applications/steam.desktop ${HOLO_INSTALL_DIR}/etc/skel/Desktop/steam.desktop
echo -e "[General]\nDisplayServer=wayland\n\n[Autologin]\nUser=${HOLOUSER}\nSession=gamescope-wayland.desktop\nRelogin=true\n\n[X11]\n# Janky workaround for wayland sessions not stopping in sddm, kills\n# all active sddm-helper sessions on teardown\nDisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround" >> ${HOLO_INSTALL_DIR}/etc/sddm.conf.d/autologin.conf
@ -351,8 +361,19 @@ full_install() {
echo "Cleaning up..."
cp /etc/skel/.bashrc ${HOLO_INSTALL_DIR}/home/${HOLOUSER}
arch-chroot ${HOLO_INSTALL_DIR} rm -rf /etc/holoinstall
arch-chroot ${HOLO_INSTALL_DIR} systemctl enable amd-perf-fix
sudo rm -rf ${HOLO_INSTALL_DIR}/etc/sudoers.d/g_wheel
sudo rm -rf ${HOLO_INSTALL_DIR}/etc/sudoers.d/liveuser
sleep 1
clear
if zenity --question --text="Would you like to have a 2GB Swap?"
then
arch-chroot ${HOLO_INSTALL_DIR} dd if=/dev/zero of=/home/.steamos/swapfile bs=1M count=2k status=progress
arch-chroot ${HOLO_INSTALL_DIR} chmod 0600 /home/.steamos/swapfile
arch-chroot ${HOLO_INSTALL_DIR} mkswap -U clear /home/.steamos/swapfile
arch-chroot ${HOLO_INSTALL_DIR} swapon /home/.steamos/swapfile
arch-chroot ${HOLO_INSTALL_DIR} echo -e "/home/.steamos/swapfile none swap defaults 0 0" >> /etc/fstab
fi
}

View File

@ -45,29 +45,30 @@ plymouth-set-default-theme -R steamos
mkinitcpio -P
# Enable stuff
systemctl enable sddm NetworkManager systemd-timesyncd cups bluetooth sshd
systemctl enable sddm NetworkManager systemd-timesyncd bluetooth sshd
# Download extra stuff
mkdir -p /etc/holoinstall/post_install/pkgs/nv
# mkdir -p /etc/holoinstall/post_install/pkgs/nv
mkdir -p /etc/holoinstall/post_install/kernels
wget $(pacman -Sp linux-firmware-neptune) -P /etc/holoinstall/post_install/pkgs_addon
wget $(pacman -Sp win600-xpad-dkms) -P /etc/holoinstall/post_install/pkgs_addon
for kernel in $(cat /etc/holoinstall/post_install/kernel_list.bootstrap)
do
cp $(pacman -Sp $kernel | cut -c8-) /etc/holoinstall/post_install/kernels
done
wget $(pacman -Sp extra-main/nvidia-dkms) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp extra-main/nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp multilib-main/lib32-nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp egl-wayland) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp egl-external-platform) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp extra-main/opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp multilib-main/lib32-opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp extra-main/nvtop) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp extra-main/nvidia-settings) -P /etc/holoinstall/post_install/pkgs/nv
wget $(pacman -Sp extra-main/nvidia-prime) -P /etc/holoinstall/post_install/pkgs/nv
rm -rf /etc/holoinstall/post_install/pkgs/nv/*.zst.* && rm -rf /etc/holoinstall/post_install/pkgs/nv/*515*
# wget $(pacman -Sp extra-main/nvidia-dkms) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp extra-main/nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp multilib-main/lib32-nvidia-utils) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp egl-wayland) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp egl-external-platform) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp extra-main/opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp multilib-main/lib32-opencl-nvidia) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp extra-main/nvtop) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp extra-main/nvidia-settings) -P /etc/holoinstall/post_install/pkgs/nv
# wget $(pacman -Sp extra-main/nvidia-prime) -P /etc/holoinstall/post_install/pkgs/nv
# rm -rf /etc/holoinstall/post_install/pkgs/nv/*.zst.* && rm -rf /etc/holoinstall/post_install/pkgs/nv/*515*
# Workaround mkinitcpio bullshit so that i don't KMS after rebuilding ISO each time and having users reinstalling their fucking OS bullshit every goddamn time.
rm /etc/mkinitcpio.conf
@ -80,4 +81,6 @@ rm -rf /etc/holoinstall/pre_install
rm /etc/pacman.conf
mv /etc/pacold /etc/pacman.conf
rm -rf /etc/xdg/powermanagementprofilesrc
rm -rf /home/liveuser/Desktop/steamos-gamemode.desktop
rm -rf /home/liveuser/Desktop/Return.desktop
systemctl disable qemu-guest-agent

View File

@ -0,0 +1,8 @@
[Unit]
Description=Set proper AMD GPU power profile
[Service]
ExecStart=/usr/bin/amd-perf-fix
[Install]
WantedBy=multi-user.target

View File

@ -1,13 +0,0 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Unit]
Description=Choose mirror from the kernel command line
ConditionKernelCommandLine=mirror
[Service]
Type=oneshot
ExecStart=/usr/local/bin/choose-mirror
[Install]
WantedBy=multi-user.target

View File

@ -1,16 +0,0 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Unit]
Description=Unmute All Sound Card Controls For Use With The Live Arch Environment
# This needs to run after the audio device becomes available.
Wants=systemd-udev-settle.service
After=systemd-udev-settle.service sound.target
ConditionKernelCommandLine=accessibility=on
[Service]
Type=oneshot
ExecStart=/usr/local/bin/livecd-sound -u
[Install]
WantedBy=sound.target

View File

@ -1,23 +0,0 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Unit]
Description=Screen reader service
After=livecd-alsa-unmuter.service
Before=getty@tty1.service
ConditionKernelCommandLine=accessibility=on
[Service]
Type=oneshot
TTYPath=/dev/tty13
ExecStartPre=/usr/bin/chvt 13
ExecStart=/usr/local/bin/livecd-sound -p
ExecStartPost=/usr/bin/chvt 1
ExecStartPost=systemctl start espeakup.service
StandardInput=tty
TTYVHangup=yes
TTYVTDisallocate=yes
RemainAfterExit=true
[Install]
WantedBy=multi-user.target

View File

@ -1 +0,0 @@
/etc/systemd/system/livecd-talk.service

View File

@ -1 +0,0 @@
../pacman-init.service

View File

@ -1 +0,0 @@
/usr/lib/systemd/system/qemu-guest-agent.service

View File

@ -1 +0,0 @@
/usr/lib/systemd/system/vboxservice.service

View File

@ -1,16 +0,0 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Unit]
Description=Initializes Pacman keyring
Requires=etc-pacman.d-gnupg.mount
After=etc-pacman.d-gnupg.mount
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/pacman-key --init
ExecStart=/usr/bin/pacman-key --populate archlinux
[Install]
WantedBy=multi-user.target

View File

@ -1,6 +0,0 @@
[Unit]
ConditionKernelCommandLine=!mirror
[Service]
Restart=on-failure
RestartSec=10

View File

@ -1 +0,0 @@
../livecd-alsa-unmuter.service

View File

@ -1,6 +0,0 @@
#
# SPDX-License-Identifier: GPL-3.0-or-later
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any

View File

@ -117,6 +117,7 @@ xl2tpd
zsh
# GUI
holo-keyring
plasma
plasma-nm
plasma-meta