Skip to content

Instantly share code, notes, and snippets.

@trexx
Last active August 29, 2024 20:16
Show Gist options
  • Save trexx/8f8bc27395e361bc002fc044dcad734e to your computer and use it in GitHub Desktop.
Save trexx/8f8bc27395e361bc002fc044dcad734e to your computer and use it in GitHub Desktop.
#!/bin/env bash
dnf install \
@"Fonts" \
ark \
bluedevil \
breeze-gtk \
breeze-icon-theme \
colord-kde \
dolphin \
firefox \
glibc-all-langpacks \
gnome-keyring-pam \
libva-utils libvdpau-va-gl \
kde-gtk-config \
kde-style-breeze \
kdegraphics-thumbnailers \
kdeplasma-addons \
kdialog \
kf5-kipi-plugins \
kf5-kwayland \
kmenuedit \
konsole \
kscreen \
kscreenlocker \
ksshaskpass \
kinfocenter \
kwin-wayland \
libinput \
libwayland-client \
libwayland-cursor
libwayland-egl \
libwayland-server \
NetworkManager-bluetooth \
NetworkManager-wifi \
dhcp-client \
iptables-nft \
firewalld.noarch \
firewall-config.noarch \
wpa_supplicant \
NetworkManager-config-connectivity-fedora \
pam-kwallet \
plasma-breeze \
plasma-desktop \
plasma-nm \
plasma-pa \
plasma-systemmonitor \
plasma-workspace-wallpapers \
plasma-workspace-wayland \
polkit-kde \
qt5-qtbase-gui \
qt5-qtdeclarative \
qt6-qtwayland \
sddm-breeze \
sddm-kcm \
sddm-wayland-plasma \
sni-qt \
wayland-utils \
xorg-x11-server-Xwayland \
xwaylandvideobridge \
iwlwifi-mvm-firmware \
intel-audio-firmware.noarch \
alsa-utils
# tpm2-tss
echo "add_dracutmodules+=\" tpm2-tss \"" | sudo tee /etc/dracut.conf.d/tpm2.conf
add_dracutmodules+=" tpm2-tss "
systemd-cryptenroll --wipe-slot tpm2 --tpm2-device auto --tpm2-pcrs "0+1+2+3+4+5+7+14" --tpm2-with-pin=true /dev/sda3
sudo dracut -f
sudo dnf pass --setopt=install_weak_deps=False install android-tools ark kate dolphin plasma-pa sddm-breeze sddm-wayland-plasma bluedevil iwlwifi-mvm-firmware NetworkManager-wifi NetworkManager-bluetooth plasma-nm plasma-systemmonitor plasma-breeze plasma-desktop pipewire konsole firefox tlp git mesa-dri-drivers mesa-vulkan-drivers kscreen
sudo dnf remove zram-generator sssd-* amd-* mt7xxx-firmware tiwilink-firmware atheros-firmware brcmfmac-firmware cirrus-audio-firmware mt7xx-firmware nvidia-gpu-firmware nxpwireless-firmware realtek-firmware tiwilink-firware
sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/vscode.repo > /dev/null
sudo dnf install code-insiders
sudo balooctl6 disable
sudo balooctl6 purge
sudo dnf install flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
flatpak install flathub com.spotify.Client tv.kodi.Kodi com.spotify.Client
sudo systemctl enable tlp
# enable SDDM
echo "Enabling the graphical login."
sudo systemctl enable sddm
sudo systemctl set-default graphical.target
/etc/modprobe.d/snd-hda-intel.conf
options snd_hda_intel enable_msi=1
options snd_hda_intel pm_blacklist=False
sudo dnf config-manager --add-repo https://download.opensuse.org/repositories/network:im:signal/Fedora_40/network:im:signal.repo
sudo dnf install signal-desktop
sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
sudo dnf install intel-media-driver kodi ffmpeg
sudo vi /etc/tmpfiles.d/intel-rapid-start.conf
w /sys/bus/acpi/drivers/intel_rapid_start/INT3392:00/wakeup_events - - - - 3
sudo dnf install https://github.com/derailed/k9s/releases/download/v0.32.5/k9s_linux_amd64.rpm
# Intel-Rapid-Start
Make sure you have 4/8GB (same as your RAM) or whatever left as free storage. (or or shrink your /home partition. Depends on your setup) I uded gparted live usb for this.
Install gdisk and do the following:
sudo gdisk /dev/sdX (x being a,b,c whatever)
type p to print partiton table, you should see something like 8GB free.
type n, to create a new partition. If you only have like 8GB space free, just type enter until you see info about Hex code or GUID.
Enter D3BFE2DE-3DAF-11DF-BA40-E3A556D89593 as a Hex code or GUID.
Finish with w and Y to write it to disk.
Reboot into bios, activate Intel rapid start and set how many hours you think is okay. I use 1 hour.
### Delayed Hibernation (Without Intel RST
[Unit]
Description=delayed hibernation trigger
Before=suspend.target
StopWhenUnneeded=true
[Service]
Type=oneshot
RemainAfterExit=yes
Environment="WAKEALARM=/sys/class/rtc/rtc0/wakealarm"
ExecStart=-/bin/sh -c 'echo -n "alarm set for "; date +%%s -d+1hour | tee $WAKEALARM'
ExecStop=-/bin/sh -c '\
alarm=$(cat $WAKEALARM); \
now=$(date +%%s); \
if [ -z "$alarm" ] || [ "$now" -ge "$alarm" ]; then \
echo "hibernate triggered"; \
systemctl hibernate; \
else \
echo "normal wakeup"; \
fi; \
echo 0 > $WAKEALARM; \
'
[Install]
WantedBy=sleep.target
Drop that into '/etc/systemd/system/suspend-to-hibernate.service' and then 'systemctl enable suspend-to-hibernate'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment