initial commit

This commit is contained in:
Sōon Yoru 2024-06-14 08:28:24 -03:00
commit f4373a3372
Signed by: yoru
GPG key ID: B63039394990CD72
17 changed files with 390 additions and 0 deletions

6
10-monitor.conf Normal file
View file

@ -0,0 +1,6 @@
Section "Monitor"
Identifier "DisplayPort-0"
Modeline "2560x1080_75.00" 294.00 2560 2744 3016 3472 1080 1083 1093 1130 -hsync +vsync
Option "PreferredMode" "2560x1080_75.00"
EndSection

1
10-ptrace.conf Normal file
View file

@ -0,0 +1 @@
kernel.yama.ptrace_scope = 0

17
grub Normal file
View file

@ -0,0 +1,17 @@
GRUB_DEFAULT=0
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR="SteamOS"
GRUB_CMDLINE_LINUX_DEFAULT="drm.edid_firmware=DP-1:edid/ultrawide.bin mitigations=off nowatchdog nmi_watchdog=0 loglevel=3 quiet splash plymouth.ignore-serial-consoles log_buf_len=4M amd_iommu=off amdgpu.lockup_timeout=5000,10000,10000,5000 amdgpu.gttsize=8128 amdgpu.sched_hw_submission=4 audit=0 fbcon=vc:4-6 fbcon=rotate:1"
GRUB_CMDLINE_LINUX="console=tty1 rd.luks=0 rd.lvm=0 rd.md=0 rd.dm=0 rd.systemd.gpt_auto=no"
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
GRUB_TIMEOUT_STYLE=menu
GRUB_TERMINAL_INPUT=console
GRUB_GFXMODE=auto
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_DISABLE_RECOVERY=true
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="light-magenta/black"
GRUB_THEME="/usr/share/grub/themes/breeze/theme.txt"

2
locale.gen Normal file
View file

@ -0,0 +1,2 @@
en_US.UTF-8 UTF-8
pt_BR.UTF-8 UTF-8

58
makepkg.conf Normal file
View file

@ -0,0 +1,58 @@
#!/hint/bash
DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
'rsync::/usr/bin/rsync --no-motd -z %u %o'
'scp::/usr/bin/scp -C %u %o')
VCSCLIENTS=('bzr::breezy'
'fossil::fossil'
'git::git'
'hg::mercurial'
'svn::subversion')
CARCH="x86_64"
CHOST="x86_64-pc-linux-gnu"
CPUFLAGS="-maes -mavx -mavx2 -mf16c -mfma -mmmx -mpclmul -mpopcnt -mrdrnd -msha -msse -msse2 -msse3 -msse4.1 -msse4.2 -msse4a -mssse3"
CFLAGS="$CPUFLAGS -march=znver2 -mtune=znver2 -Ofast -pipe -fomit-frame-pointer -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection"
CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
LTOFLAGS="-flto=auto"
RUSTFLAGS=""
MAKEFLAGS="-j8"
DEBUG_CFLAGS="-g"
DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
DEBUG_RUSTFLAGS="-C debuginfo=2"
BUILDENV=(!distcc color !ccache check !sign)
#DISTCC_HOSTS=""
BUILDDIR=/tmp/makepkg
OPTIONS=(strip !docs !libtool !staticlibs emptydirs zipman purge !debug lto)
INTEGRITY_CHECK=(sha256)
STRIP_BINARIES="--strip-all"
STRIP_SHARED="--strip-unneeded"
STRIP_STATIC="--strip-debug"
MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
DBGSRCDIR="/usr/src/debug"
COMPRESSGZ=(gzip -c -f -n)
COMPRESSBZ2=(bzip2 -c -f)
COMPRESSXZ=(xz -c -z -)
COMPRESSZST=(zstd -c -T0 --ultra -20 -)
COMPRESSLRZ=(lrzip -q)
COMPRESSLZO=(lzop -q)
COMPRESSZ=(compress -c -f)
COMPRESSLZ4=(lz4 -q)
COMPRESSLZ=(lzip -c -f)
PKGEXT='.pkg.tar.zst'
SRCEXT='.src.tar.gz'

2
memlock.conf Normal file
View file

@ -0,0 +1,2 @@
* hard memlock 2147484
* soft memlock 2147484

2
mglru.conf Normal file
View file

@ -0,0 +1,2 @@
w /sys/kernel/mm/lru_gen/enabled - - - - 7
w /sys/kernel/mm/lru_gen/min_ttl_ms - - - - 0

36
pacman.conf Normal file
View file

@ -0,0 +1,36 @@
[options]
DBPath = /usr/lib/holo/pacmandb/
CacheDir= /home/deck/.local/cache/pacman/pkg/
HoldPkg = pacman glibc
Architecture = auto
#IgnorePkg =
#IgnoreGroup =
#NoUpgrade =
NoExtract =usr/share/doc/* usr/share/gtk-dock/* usr/share/help/*
Color
CheckSpace
VerbosePkgLists
ParallelDownloads = 10
SigLevel = Required DatabaseOptional
LocalFileSigLevel = Optional
[jupiter-main]
Include = /etc/pacman.d/mirrorlist
[holo-main]
Include = /etc/pacman.d/mirrorlist
[core-main]
Include = /etc/pacman.d/mirrorlist
[extra-main]
Include = /etc/pacman.d/mirrorlist
[community-main]
Include = /etc/pacman.d/mirrorlist
[multilib-main]
Include = /etc/pacman.d/mirrorlist

104
post_upgrade.sh Executable file
View file

@ -0,0 +1,104 @@
#!/bin/sh
# Sōon Yoru <yoru@serialexperiments.club>
set -e
if test $(id -u) != 0; then
echo must be root!
exit
fi
REPO=main
steamos-readonly disable
cd "$(dirname "$0")"
install() {
pacman -S --overwrite "*" --needed --noconfirm $@
}
#cp -fv 10-monitor.conf /etc/X11/xorg.conf.d/
cp -fv 10-ptrace.conf /etc/sysctl.d/
cp -fv mglru.conf /etc/tmpfiles.d/
cp -fv memlock.conf /etc/security/limits.d/
cp -fv locale.gen /etc/
#cp -fv post_upgrade.service /etc/systemd/system/
#systemctl --system daemon-reload
#systemctl enable post_upgrade
mkdir -p /usr/lib/firmware/edid/
cp -fv ultrawide70.bin /usr/lib/firmware/edid/ultrawide.bin
cp -fv grub /etc/default/grub
if ! grep -rin ultrawide.bin /boot/efi/EFI/steamos/grub.cfg; then
grub-mkconfig -o /boot/efi/EFI/steamos/grub.cfg
fi
pacman-key --init
pacman-key --populate archlinux holo
cp -fv pacman.conf /etc/
cp -fv makepkg.conf /etc/
pacman -Sy
# some c headers are missing in the default installation
# needed to build programs
if test ! -f /usr/include/bits/types.h; then
pacman -S --asdeps --noconfirm holo-$REPO/glibc holo-$REPO/lib32-glibc core-$REPO/linux-api-headers hidapi
fi
if test ! -d /usr/include/qt; then
pacman -S --asdeps --noconfirm qt5-base qt5-tools
fi
if test ! -f /usr/include/python3.11/Python.h; then
pacman -S --asdeps --noconfirm python
fi
install base-devel cmake extra-cmake-modules vulkan-headers git fish
chsh -s /usr/bin/fish deck
install xfce4 network-manager-applet nm-connection-editor xfce4-pulseaudio-plugin xfce4-eyes-plugin xfce4-sensors-plugin thunar-archive-plugin thunar-volman xfce4-screenshooter xfce4-taskmanager gnome-software gvfs
cp -fv startxfce4-steamos-oneshot /usr/bin/
cp -fv xfce4-steamos-oneshot.desktop /usr/share/xsessions/
cp -fv xfce4-steamos-wayland-oneshot.desktop /usr/share/wayland-sessions/
#cp -fv zz-steamos-autologin.conf /etc/sddm.conf.d/
cp -fv steamos-session-select /usr/bin/
install python python-pip
install keybase kbfs veracrypt
install mpv
install wine winetricks
sudo -u deck wineboot -u
if test ! -f /usr/bin/pikaur; then
pushd pikaur
git clean -fdx
git reset --hard 75bc4f077f7691ab08a73470582b2a337016c6c5
install --asdeps python-hatchling python-build python-installer python-setuptools python-markdown-it-py pyalpm
sudo -u deck makepkg -f
pacman -U --noconfirm pikaur*.tar.zst
popd
fi
if test ! -f /usr/bin/openrgb; then
pushd openrgb-git
git clean -fdx
git pull origin master
install --asdeps mbedtls
sudo -u deck makepkg -f
pacman -U --noconfirm openrgb-git*.tar.zst
popd
fi
if test ! -f /usr/bin/mouse-actions-gui; then
sudo -u deck pikaur -G mouse-actions-gui-bin
install --asdeps webkit2gtk
pushd mouse-actions-gui-bin
rm -f *.tar.zst
sudo -u deck makepkg -cCf
pacman -U --noconfirm mouse-actions-gui-bin*.tar.zst
gpasswd -a deck input
popd
fi

53
startxfce4-steamos-oneshot Executable file
View file

@ -0,0 +1,53 @@
#!/bin/bash
set -e
die() { echo >&2 "!! $*"; exit 1; }
SENTINEL_FILE="steamos-session-select"
SENTINEL_VALUE="x11"
# If we proceed, execute this
CHAINED_SESSION="/usr/bin/xfce4-session"
# If we decide the sentinel is consumed, execute this command instead and fail
RESTORE_SESSION=(steamos-session-select) # No arguments restores the session
# Find or check config sentinel
function check_sentinel()
{
if [[ -z ${HOME+x} ]]; then
echo >&2 "$0: No \$HOME variable!"
# Rather than break we'll just launch plasma and hope for the best?
return 0
fi
local config_dir="${XDG_CONF_DIR:-"$HOME/.config"}"
(
cd "$HOME"
cd "$config_dir"
sentinel_value="$(cat "$SENTINEL_FILE")"
if [[ "$sentinel_value" == "wayland" ]]; then
echo "/usr/bin/startxfce4-wayland"
elif [[ "$sentinel_value" == "x11" ]]; then
echo "/usr/bin/startxfce4"
else
return 1
fi
rm "$SENTINEL_FILE"
) || return 1 # If we couldn't read the value or it wasn't what we wanted
# Found value and removed it, we're good to continue
return 0
}
if CONFIGURED_CHAINED_SESSION=$(check_sentinel); then
# We found and consumed the oneshot sentinel, proceed to launch plasma
echo >&2 "$0: Found and removed sentinel file for one-shot plasma, proceeding to launch"
exec "$CONFIGURED_CHAINED_SESSION"
else
echo >&2 "$0: Sentinel value not found, executing session-select to restore session"
"${RESTORE_SESSION[@]}" || echo >&2 "$0: !! Failed to restore previous session, executing chained session"
# Session restore should've stopped us, if it is broken at least let plasma continue to open
exec "$CHAINED_SESSION"
fi

94
steamos-session-select Executable file
View file

@ -0,0 +1,94 @@
#!/bin/bash
set -e
die() { echo >&2 "!! $*"; exit 1; }
# FIXME Purge old files and use this one
# File this script will modify, in addition to (potentially) the per-user sentinel file
CONF_FILE="/etc/sddm.conf.d/zz-steamos-autologin.conf"
SENTINEL_FILE="steamos-session-select"
# For sanity this shipped file must be present, to ensure we're still on a normal-looking steamos setup.
CHECK_FILE="/etc/sddm.conf.d/steamos.conf"
session="${1:-gamescope}"
session_type="x11"
session_launcher=""
create_sentinel=""
if [[ "$2" == "--sentinel-created" ]]; then
SENTINEL_CREATED=1
if [[ "$3" == "x11" ]]; then
session_type="x11"
elif [[ "$3" == "wayland" ]]; then
session_type="wayland"
fi
fi
# Update config sentinel
if [[ -z $SENTINEL_CREATED ]]; then
[[ $EUID == 0 ]] && die "Running $0 as root is not allowed"
[[ -n ${HOME+x} ]] || die "No \$HOME variable"
config_dir="${XDG_CONF_DIR:-"$HOME/.config"}"
session_type=$(
cd "$HOME"
mkdir -p "$config_dir"
cd "$config_dir"
if [[ -f "steamos-session-type" ]]; then
cp steamos-session-type "$SENTINEL_FILE"
else
echo "x11" > "$SENTINEL_FILE"
fi
cat "$SENTINEL_FILE"
)
# If we were executed as a session user and then re-execute as root below, we don't want to set root's sentinel too
export SENTINEL_CREATED=1
fi
case "$session" in
plasma-wayland-persistent)
session_launcher="plasmawayland.desktop"
;;
plasma-x11-persistent)
session_launcher="plasma.desktop"
;;
plasma)
if [[ "$session_type" == "x11" ]]; then
session_launcher="xfce4-steamos-oneshot.desktop"
else
session_launcher="xfce4-steamos-wayland-oneshot.desktop"
fi
create_sentinel=1
;;
gamescope)
session_launcher="gamescope-wayland.desktop"
;;
*)
echo >&2 "!! Unrecognized session '$session'"
exit 1
;;
esac
echo "Updated user selected session to $session_launcher"
# Become root
if [[ $EUID != 0 ]]; then
exec pkexec "$(realpath $0)" "$session" --sentinel-created "$session_type"
exit 1
fi
{
echo "[Autologin]"
echo "Session=$session_launcher"
} > "$CONF_FILE"
echo "Updated system autologin session to $session_launcher"
systemctl reset-failed sddm
systemctl restart sddm
echo "Restarted SDDM"

BIN
ultrawide60.bin Normal file

Binary file not shown.

BIN
ultrawide70.bin Normal file

Binary file not shown.

BIN
ultrawide75.bin Normal file

Binary file not shown.

View file

@ -0,0 +1,7 @@
[Desktop Entry]
Type=XSession
Exec=/usr/bin/startxfce4-steamos-oneshot
TryExec=/usr/bin/startxfce4-steamos-oneshot
DesktopNames=XFCE
Name=XFCE
Comment=XFCE4 - One Time Launch Redirect for SteamOS Sessions

View file

@ -0,0 +1,6 @@
[Desktop Entry]
Exec=/usr/bin/startxfce4-steamos-oneshot
TryExec=/usr/bin/startxfce4-steamos-oneshot
DesktopNames=XFCE
Name=XFCE
Comment=XFCE - One Time Launch Redirect for SteamOS Sessions

View file

@ -0,0 +1,2 @@
[Autologin]
Session=xfce4-steamos-oneshot.desktop