initial commit

This commit is contained in:
NeilClack
2026-08-07 14:51:41 -05:00
commit 9251b3a196
604 changed files with 464448 additions and 0 deletions
@@ -0,0 +1,55 @@
// Allow kiosk user to run apt update, apt install for rhemawave packages,
// and restart getty for application reloading
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.policykit.exec" &&
subject.user == "kiosk") {
var program = action.lookup("program");
var cmdline = action.lookup("command_line");
// Allow dpkg --configure -a
if (program == "/usr/bin/dpkg") {
if (cmdline && cmdline.indexOf("--configure") >= 0) {
return polkit.Result.YES;
}
}
// Allow apt update
if (program == "/usr/bin/apt") {
if (cmdline && cmdline.indexOf("update") >= 0) {
return polkit.Result.YES;
}
// Allow: apt install --only-upgrade rhemawave[-dev]
if (cmdline &&
cmdline.indexOf("install") >= 0 &&
cmdline.indexOf("--only-upgrade") >= 0 &&
cmdline.indexOf("rhemawave") >= 0) {
return polkit.Result.YES;
}
}
// Allow systemctl restart getty@tty1.service
if (program == "/usr/bin/systemctl") {
if (cmdline &&
cmdline.indexOf("restart") >= 0 &&
cmdline.indexOf("getty@tty1.service") >= 0) {
return polkit.Result.YES;
}
}
// Allow sh for Tailscale install script
if (program == "/usr/bin/sh" || program == "/bin/sh") {
if (cmdline && cmdline.indexOf("tailscale.com/install.sh") >= 0) {
return polkit.Result.YES;
}
}
// Allow tailscale set --operator
if (program == "/usr/bin/tailscale") {
if (cmdline && cmdline.indexOf("set") >= 0 && cmdline.indexOf("--operator") >= 0) {
return polkit.Result.YES;
}
}
}
});
+3
View File
@@ -0,0 +1,3 @@
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin kiosk --noclear %I $TERM
+24
View File
@@ -0,0 +1,24 @@
#!/bin/bash
# Post-installation script for RhemaWave
set -e
# Create kiosk group if it doesn't exist
if ! getent group kiosk > /dev/null 2>&1; then
echo "Creating kiosk group..."
groupadd --system kiosk
fi
# Create kiosk user if it doesn't exist
if ! getent passwd kiosk > /dev/null 2>&1; then
echo "Creating kiosk user..."
useradd --system --gid kiosk --create-home --home-dir /home/kiosk \
--shell /bin/bash --comment "RhemaWave Kiosk User" kiosk
fi
# Set proper group ownership for writable directories
chgrp -R kiosk /usr/local/share/rhemawave
# Ensure kiosk user can write to the data directory
chmod g+w /usr/local/share/rhemawave
echo "✓ RhemaWave post-install complete"
+16
View File
@@ -0,0 +1,16 @@
# RhemaWave kiosk auto-launch on tty1
if [ -z "$WAYLAND_DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export SDL_VIDEODRIVER=wayland
# Check for updates before launching
/usr/bin/python3 /usr/local/bin/rhemawave-updater.py || true
# Set all sinks to full volume
for sink in $(wpctl status | grep -oP '^\s+\K\d+(?=\.)' | head -10); do
wpctl set-volume "$sink" 1.0 2>/dev/null
done
exec cage -- /usr/local/bin/rhemawave
fi