mirror of
https://github.com/tumillanino/miasma-os.git
synced 2026-06-15 12:39:33 +00:00
kernel still breaking. updated name which may have been issue
This commit is contained in:
3
docs/solarpowered-main/files/shared/usr/bin/append
Executable file
3
docs/solarpowered-main/files/shared/usr/bin/append
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
/usr/bin/just --justfile /usr/share/appends/00-master.just "${@}"
|
||||
10
docs/solarpowered-main/files/shared/usr/bin/melonDS
Executable file
10
docs/solarpowered-main/files/shared/usr/bin/melonDS
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if any arguments were passed to the script
|
||||
if [ "$#" -gt 0 ]; then
|
||||
# If arguments are passed, include them in the flatpak run command
|
||||
flatpak run net.kuribo64.melonDS "$@"
|
||||
else
|
||||
# If no arguments are passed, just run the flatpak without any file
|
||||
flatpak run net.kuribo64.melonDS
|
||||
fi
|
||||
19
docs/solarpowered-main/files/shared/usr/bin/rechunker-group-fix
Executable file
19
docs/solarpowered-main/files/shared/usr/bin/rechunker-group-fix
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
IGNORE_MANUAL="wheel|root|sudo|nobody"
|
||||
for manually_created_user in $(grep -E -e ".*:[1-3][[:digit:]]{3}:.*" "$1") ; do
|
||||
# `grep` matched on a group with GID [1-3]000 or so
|
||||
if [ ! -z "$(cut -f4 -d: <<< "${manually_created_user}")" ] ; then
|
||||
continue
|
||||
fi
|
||||
IGNORE_MANUAL="$(cut -f1,3 -d: --output-delimiter="|" <<< "${manually_created_user}")|${IGNORE_MANUAL:-}"
|
||||
for related_group in $(grep "$(cut -f1 -d: <<< ${manually_created_user})" "$1"); do
|
||||
# Deduplicates matches for the same group/user
|
||||
if [ "$(cut -f1 <<< "${related_group}")" == "$(cut -f1 <<< "${manually_created_user}")" ] ; then
|
||||
continue
|
||||
fi
|
||||
IGNORE_MANUAL="$(cut -f1 -d: <<< "${related_group}")|${IGNORE_MANUAL:-}"
|
||||
done
|
||||
done
|
||||
|
||||
grep --no-filename -e "^g" /usr/lib/sysusers.d/*.conf | grep -v -E -e "${IGNORE_MANUAL}" | tr -s " " | cut -d" " -f2 | uniq | xargs -I{} sed -i "/{}/d" "${1}"
|
||||
10
docs/solarpowered-main/files/shared/usr/bin/ryujinx
Executable file
10
docs/solarpowered-main/files/shared/usr/bin/ryujinx
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if any arguments were passed to the script
|
||||
if [ "$#" -gt 0 ]; then
|
||||
# If arguments are passed, include them in the flatpak run command
|
||||
flatpak run io.github.ryubing.Ryujinx "$@"
|
||||
else
|
||||
# If no arguments are passed, just run the flatpak without any file
|
||||
flatpak run io.github.ryubing.Ryujinx
|
||||
fi
|
||||
27
docs/solarpowered-main/files/shared/usr/bin/waydroid-session
Executable file
27
docs/solarpowered-main/files/shared/usr/bin/waydroid-session
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/sh
|
||||
|
||||
export XDG_RUNTIME_DIR=/run/user/$(id -u)
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
eval $(dbus-launch --sh-syntax)
|
||||
fi
|
||||
|
||||
mutter --wayland &
|
||||
MUTTER_PID=$!
|
||||
sleep 5
|
||||
export DISPLAY=:1
|
||||
|
||||
# Start Waydroid in the background
|
||||
waydroid show-full-ui &
|
||||
WAYDROID_PID=$!
|
||||
|
||||
# Wait for Waydroid exit event in the log
|
||||
tail -f -n0 /var/lib/waydroid/waydroid.log | grep -m1 run_buffer
|
||||
|
||||
# Cleanup and logout
|
||||
kill $WAYDROID_PID
|
||||
kill $MUTTER_PID
|
||||
|
||||
# Use loginctl to end the session gracefully
|
||||
loginctl terminate-session "$XDG_SESSION_ID"
|
||||
|
||||
exit 0
|
||||
27
docs/solarpowered-main/files/shared/usr/bin/zstar
Executable file
27
docs/solarpowered-main/files/shared/usr/bin/zstar
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Define directory & target filename
|
||||
directory="$1"
|
||||
filename="$2"
|
||||
|
||||
# Check if the filename already has .tar.zst; if not, append it
|
||||
if [[ ! "$filename" =~ \.tar\.zst$ ]]; then
|
||||
archive="$filename.tar.zst"
|
||||
else
|
||||
archive="$filename"
|
||||
fi
|
||||
|
||||
# Make sure the directory exists
|
||||
if [[ ! -d "$directory" ]]; then
|
||||
echo "Directory '$directory' not found."
|
||||
return 1
|
||||
fi
|
||||
|
||||
# Create the archive with tar and pipe it to zstd
|
||||
tar -cvf - "$directory" | zstd -9 -T0 -o "$archive"
|
||||
|
||||
# Check for errors during compression
|
||||
if [[ $? -ne 0 ]]; then
|
||||
echo "Error during compression."
|
||||
return 1
|
||||
fi
|
||||
@@ -0,0 +1,27 @@
|
||||
# We have this script so that people using images with `nss-altfiles` (`/usr/lib/g{roup,shadow}`)
|
||||
# do not break their systems when rebasing to an image without that
|
||||
# This usually happens when using https://github.com/hhd-dev/rechunk then rebasing to an image without it.
|
||||
# Please DO NOT remove this unless this is fully, completely obsolete.
|
||||
# This is exactly what is making it break: https://github.com/ublue-os/legacy-rechunk/blob/1d2b0c2e99afbdc2eb06788ae28e157a88b03d70/1_prune.sh#L41-L47
|
||||
# Users WILL experience black screens and systems will NOT boot if this script malfunctions. Please test this properly and always make sure this works
|
||||
# Relevant issues:
|
||||
# - https://github.com/bootc-dev/bootc/issues/1179#issuecomment-2708305926
|
||||
# - https://github.com/ublue-os/main/issues/759
|
||||
# - https://github.com/ublue-os/bluefin-lts/issues/918
|
||||
# - https://github.com/ublue-os/image-template/issues/177
|
||||
# - https://github.com/ublue-os/aurora/issues/1468
|
||||
# - https://github.com/ublue-os/bluefin/issues/3852
|
||||
# This got created on Tue, 16 Dec 2025 00:44:58 -0300
|
||||
[Unit]
|
||||
Description=Fix groups for Legacy rechunker
|
||||
Wants=local-fs.target
|
||||
After=local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=rechunker-group-fix /etc/group
|
||||
ExecStart=rechunker-group-fix /etc/gshadow
|
||||
ExecStart=systemd-sysusers
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target multi-user.target
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Topgrade update service
|
||||
Wants=network-online.target
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecCondition=/bin/bash -c '[[ "$(busctl get-property org.freedesktop.NetworkManager /org/freedesktop/NetworkManager org.freedesktop.NetworkManager Metered | cut -c 3-)" == @(2|4) ]]'
|
||||
ExecStart=/usr/bin/topgrade --no-retry --cleanup --yes
|
||||
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Topgrade update service timer
|
||||
|
||||
[Timer]
|
||||
RandomizedDelaySec=5m
|
||||
OnBootSec=2m
|
||||
OnUnitActiveSec=12h
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1 @@
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
@@ -0,0 +1 @@
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666", TAG+="uaccess", TAG+="udev-acl"
|
||||
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
sudo waydroid container restart
|
||||
@@ -0,0 +1,9 @@
|
||||
set allow-duplicate-recipes := true
|
||||
set ignore-comments := true
|
||||
|
||||
import "/usr/share/appends/01-system.just"
|
||||
import "/usr/share/appends/10-apps.just"
|
||||
import? "/usr/share/appends/99-solarpowered-ex.just"
|
||||
import? "/usr/share/appends/99-solarpowered.just"
|
||||
import? "$HOME/.justfile"
|
||||
import? "$HOME/Justfile"
|
||||
@@ -0,0 +1,124 @@
|
||||
# Boot into this device's BIOS/UEFI screen
|
||||
bios:
|
||||
#!/usr/bin/bash
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
systemctl reboot --firmware-setup
|
||||
else
|
||||
echo "Rebooting to legacy BIOS from OS is not supported."
|
||||
fi
|
||||
|
||||
# Regenerate GRUB config
|
||||
regenerate-grub:
|
||||
#!/usr/bin/env bash
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
sudo grub2-mkconfig -o /etc/grub2-efi.cfg
|
||||
else
|
||||
sudo grub2-mkconfig -o /etc/grub2.cfg
|
||||
fi
|
||||
|
||||
# Check for local overrides
|
||||
check-local-overrides:
|
||||
#!/usr/bin/env bash
|
||||
diff -r \
|
||||
--suppress-common-lines \
|
||||
--color="always" \
|
||||
--exclude "passwd*" \
|
||||
--exclude "group*" \
|
||||
--exclude="subgid*" \
|
||||
--exclude="subuid*" \
|
||||
--exclude="machine-id" \
|
||||
--exclude="adjtime" \
|
||||
--exclude="fstab" \
|
||||
--exclude="system-connections" \
|
||||
--exclude="shadow*" \
|
||||
--exclude="gshadow*" \
|
||||
--exclude="ssh_host*" \
|
||||
--exclude="cmdline" \
|
||||
--exclude="crypttab" \
|
||||
--exclude="hostname" \
|
||||
--exclude="localtime" \
|
||||
--exclude="locale*" \
|
||||
--exclude="*lock" \
|
||||
--exclude=".updated" \
|
||||
--exclude="*LOCK" \
|
||||
--exclude="vconsole*" \
|
||||
--exclude="00-keyboard.conf" \
|
||||
--exclude="grub" \
|
||||
--exclude="system.control*" \
|
||||
--exclude="cdi" \
|
||||
--exclude="default.target" \
|
||||
/usr/etc /etc 2>/dev/null | sed '/Binary\ files\ /d'
|
||||
|
||||
# Show changelog between deployments
|
||||
changelogs:
|
||||
rpm-ostree db diff --changelogs
|
||||
|
||||
# Clean up old up unused podman images, volumes, flatpak packages and rpm-ostree content
|
||||
clean-system:
|
||||
podman image prune -af
|
||||
podman volume prune -f
|
||||
flatpak uninstall --unused
|
||||
rpm-ostree cleanup -bm
|
||||
|
||||
# Renew IP & flush DNS
|
||||
reset-address:
|
||||
sudo nmcli device disconnect enp4s0
|
||||
sudo nmcli device connect enp4s0
|
||||
sudo systemctl restart systemd-resolved
|
||||
systemd-resolve --status
|
||||
|
||||
# Enable iwd, disable wpa_supplicant
|
||||
enable-iwd:
|
||||
#!/usr/bin/env bash
|
||||
sudo systemctl disable --now wpa_supplicant
|
||||
sudo systemctl mask wpa_supplicant
|
||||
mkdir -Z /etc/NetworkManager/conf.d
|
||||
sudo cat > /etc/NetworkManager/conf.d/iwd.conf <<EOF
|
||||
[device]
|
||||
wifi.backend=iwd
|
||||
EOF
|
||||
restorecon -R /etc/NetworkManager
|
||||
sudo systemctl restart NetworkManager
|
||||
|
||||
# Disable iwd, reenable wpa_supplicant
|
||||
disable-iwd:
|
||||
sudo mv "/etc/NetworkManager/conf.d/iwd.conf" "/etc/NetworkManager/conf.d/iwd.conf.off"
|
||||
sudo systemctl disable --now iwd
|
||||
sudo systemctl unmask wpa_supplicant
|
||||
sudo systemctl enable --now wpa_supplicant
|
||||
sudo systemctl restart NetworkManager
|
||||
|
||||
# Disable Zram and enable Zswap. Requires reboot
|
||||
enable-zswap: disable-zram
|
||||
sudo rpm-ostree kargs --append-if-missing=zswap.enabled=1 --append-if-missing=zswap.compressor=lz4 --append-if-missing=zswap.max_pool_percent=25
|
||||
echo "Zswap is enabled and changes will reflect upon reboot."
|
||||
|
||||
# Enable Zram and disable zswap. Requires reboot
|
||||
disable-zswap: enable-zram
|
||||
sudo rpm-ostree kargs --delete-if-present=zswap.enabled=1 --delete-if-present=zswap.compressor=lz4 --delete-if-present=zswap.max_pool_percent=25
|
||||
echo "Zswap is disabled and changes will reflect upon reboot."
|
||||
|
||||
# Disable Zram. Requires reboot
|
||||
disable-zram:
|
||||
#!/usr/bin/env bash
|
||||
if [[ -e /etc/systemd/zram-generator.conf ]]; then
|
||||
sudo mv /etc/zram-generator.conf /etc/zram-generator.conf.bak
|
||||
fi
|
||||
sudo touch /etc/systemd/zram-generator.conf
|
||||
if [[ -e /etc/udev/rules.d/30-zram.rules ]]; then
|
||||
sudo mv /etc/udev/rules.d/30-zram.rules /etc/udev/rules.d/30-zram.rules.bak
|
||||
fi
|
||||
sudo touch /etc/udev/rules.d/30-zram.rules
|
||||
sudo systemctl daemon-reload
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
echo "Zram is disabled and changes will reflect upon reboot."
|
||||
|
||||
# Enable Zram. Requires reboot
|
||||
enable-zram:
|
||||
sudo rm /etc/systemd/zram-generator.conf
|
||||
sudo rm /etc/udev/rules.d/30-zram.rules
|
||||
sudo systemctl daemon-reload
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger
|
||||
echo "Zram is enabled and changes will reflect upon reboot."
|
||||
@@ -0,0 +1,96 @@
|
||||
# Setup box
|
||||
box:
|
||||
distrobox-assemble create --file https://raw.githubusercontent.com/askpng/box/refs/heads/main/box.ini
|
||||
distrobox-start boxit
|
||||
|
||||
# set junction as default for browsers
|
||||
setup-junction:
|
||||
xdg-settings set default-web-browser re.sonny.Junction.desktop
|
||||
|
||||
# install flameshot and grant screenshot permission
|
||||
setup-flameshot:
|
||||
flatpak install --noninteractive --assumeyes org.flameshot.Flameshot
|
||||
flatpak permission-set screenshot screenshot org.flameshot.Flameshot yes
|
||||
|
||||
# Scripts to initialize, configure, integrate & reset Waydroid
|
||||
setup-waydroid:
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [ "$OPTION" == "" ]; then
|
||||
echo "${bold}Waydroid utilities${normal}"
|
||||
PS3="Please select an option: "
|
||||
select OPTION in "Initialize Waydroid" "Configure Waydroid" "Enable fake touch" "Set as Nicole" "Install APKCombo installer and Material Files" "Logs, clean version" "Reset Waydroid (also removes waydroid-related files from user folder)"; do
|
||||
if [[ -n "$OPTION" ]]; then
|
||||
break
|
||||
else
|
||||
echo "Invalid option, please try again."
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ "${OPTION,,}" =~ ^init ]]; then
|
||||
echo "sudo systemctl enable --now waydroid-container.service"
|
||||
sudo systemctl enable --now waydroid-container.service
|
||||
echo "waydroid init -s VANILLA -c 'https://ota.waydro.id/system' -v 'https://ota.waydro.id/vendor'"
|
||||
sudo waydroid init -s VANILLA -c 'https://ota.waydro.id/system' -v 'https://ota.waydro.id/vendor'
|
||||
echo "sudo restorecon -R /var/lib/waydroid"
|
||||
sudo restorecon -R /var/lib/waydroid
|
||||
echo "cp /usr/share/applications/waydroid-container-restart.desktop ~/.local/share/applications"
|
||||
cp /usr/share/applications/waydroid-container-restart.desktop ~/.local/share/applications
|
||||
echo "Waydroid has been initialized. Before continuing, run 'waydroid session start' and ensure it is up and running well."
|
||||
|
||||
elif [[ "${OPTION,,}" =~ ^configure ]]; then
|
||||
echo "git clone https://github.com/askpng/waydroid_script.git --depth 1 /tmp/waydroid_script"
|
||||
git clone https://github.com/askpng/waydroid_script.git --depth 1 /tmp/waydroid_script
|
||||
echo "python3 -m venv /tmp/waydroid_script/venv"
|
||||
python3 -m venv /tmp/waydroid_script/venv
|
||||
echo "source /tmp/waydroid_script/venv/bin/activate"
|
||||
source /tmp/waydroid_script/venv/bin/activate
|
||||
echo "sudo /tmp/waydroid_script/venv/bin/pip install -r /tmp/waydroid_script/requirements.txt"
|
||||
sudo /tmp/waydroid_script/venv/bin/pip install -r /tmp/waydroid_script/requirements.txt
|
||||
echo "/tmp/waydroid_script/venv/bin/python3 /tmp/waydroid_script/main.py"
|
||||
sudo /tmp/waydroid_script/venv/bin/python3 /tmp/waydroid_script/main.py
|
||||
echo "deactivate"
|
||||
deactivate
|
||||
echo "sudo rm -rf /tmp/waydroid_script"
|
||||
sudo rm -rf /tmp/waydroid_script ~/.cache/waydroid_script
|
||||
|
||||
elif [[ "${OPTION,,}" =~ ^enable ]]; then
|
||||
echo "Setting fake touch for Aniplex apps..."
|
||||
waydroid prop set persist.waydroid.fake_touch "com.aniplex.*"
|
||||
|
||||
elif [[ "${OPTION,,}" =~ ^set ]]; then
|
||||
echo "curl -L 'https://raw.githubusercontent.com/askpng/waydroid_script/refs/heads/main/scripts/nicole.sh' -o /tmp/nicole.sh"
|
||||
curl -L 'https://raw.githubusercontent.com/askpng/waydroid_script/refs/heads/main/scripts/nicole.sh' -o /tmp/nicole.sh
|
||||
echo "chmod +x /tmp/nicole.sh"
|
||||
chmod +x /tmp/nicole.sh
|
||||
echo "sudo bash -c /tmp/nicole.sh"
|
||||
sudo bash -c /tmp/nicole.sh
|
||||
echo "rm -f /tmp/nicole.sh"
|
||||
rm -f /tmp/nicole.sh
|
||||
|
||||
elif [[ "${OPTION,,}" =~ ^install ]]; then
|
||||
echo "Installing APKCombo Installer"
|
||||
curl -L "https://static.apkflash.com/files/com.apkcombo.app/apkcombo-installer.apk" -o /tmp/apkcombo-installer.apk
|
||||
waydroid app install /tmp/apkcombo-installer.apk
|
||||
echo "Installing Material Files"
|
||||
curl -L "https://f-droid.org/repo/me.zhanghai.android.files_39.apk" -o /tmp/material-files.apk
|
||||
waydroid app install /tmp/material-files.apk
|
||||
echo "Removing .APK files"
|
||||
rm /tmp/apkcombo-installer.apk /tmp/material-files.apk
|
||||
echo "Success!"
|
||||
|
||||
elif [[ "${OPTION,,}" =~ ^logs ]]; then
|
||||
echo "Grabbing clean logs..."
|
||||
sudo waydroid logcat | grep -vi controller | grep -vi mantis | grep -vi gamepad | grep -v lowmemorykiller | grep -v libprocessgroup
|
||||
|
||||
elif [[ "${OPTION,,}" =~ ^reset ]]; then
|
||||
echo "Resetting Waydroid"
|
||||
echo "bash -c 'sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid'"
|
||||
bash -c 'sudo rm -rf /var/lib/waydroid /home/.waydroid ~/waydroid ~/.share/waydroid ~/.local/share/applications/*aydroid* ~/.local/share/waydroid'
|
||||
echo "sudo systemctl disable --now waydroid-container.service"
|
||||
sudo systemctl disable --now waydroid-container.service
|
||||
echo "Waydroid has been reset! Re-initialize to get it back up and running."
|
||||
|
||||
fi
|
||||
@@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Force Restart Waydroid
|
||||
Exec=pkexec /usr/libexec/waydroid-container-restart
|
||||
Categories=X-WayDroid-App;
|
||||
X-Purism-FormFactor=Workstation;Mobile;
|
||||
Icon=waydroid
|
||||
NoDisplay=false
|
||||
@@ -0,0 +1,5 @@
|
||||
[Desktop Entry]
|
||||
Name=WayDroid on Mutter
|
||||
Comment=LineageOS in a container
|
||||
Exec=/usr/bin/waydroid-session
|
||||
Type=Application
|
||||
Reference in New Issue
Block a user