From 043686c9828c07745a271f325b0db8b9d914a8d8 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 7 Dec 2024 00:21:11 +0100 Subject: [PATCH] clean up a bit and fix sound --- airootfs/etc/pam.d/{cage => asd} | 0 .../systemd/system/abrechenbarkeit@.service | 4 +-- airootfs/etc/sysusers.d/abrechenbarkeit.conf | 5 +++ airootfs/usr/local/bin/app_main | 7 ++++ .../local/share/webapps/no_config/index.html | 32 +++++++++++++++++++ packages.x86_64 | 1 - profiledef.sh | 1 + 7 files changed, 47 insertions(+), 3 deletions(-) rename airootfs/etc/pam.d/{cage => asd} (100%) create mode 100644 airootfs/usr/local/bin/app_main create mode 100644 airootfs/usr/local/share/webapps/no_config/index.html diff --git a/airootfs/etc/pam.d/cage b/airootfs/etc/pam.d/asd similarity index 100% rename from airootfs/etc/pam.d/cage rename to airootfs/etc/pam.d/asd diff --git a/airootfs/etc/systemd/system/abrechenbarkeit@.service b/airootfs/etc/systemd/system/abrechenbarkeit@.service index 203c456..17ec6a7 100644 --- a/airootfs/etc/systemd/system/abrechenbarkeit@.service +++ b/airootfs/etc/systemd/system/abrechenbarkeit@.service @@ -14,7 +14,7 @@ Wants=network-online.target [Service] Type=simple -ExecStart=/usr/bin/fish -c '/usr/bin/cage -d -- electron --ozone-platform=wayland (cat /sys/firmware/efi/efivars/AppUrl-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 | tail -c +5)' +ExecStart=/usr/local/bin/app_main Restart=always User=abrechenbarkeit UtmpIdentifier=%I @@ -24,7 +24,7 @@ TTYReset=yes TTYVHangup=yes TTYVTDisallocate=yes StandardInput=tty-fail -PAMName=cage +PAMName=asd [Install] WantedBy=graphical.target diff --git a/airootfs/etc/sysusers.d/abrechenbarkeit.conf b/airootfs/etc/sysusers.d/abrechenbarkeit.conf index 2e5c882..b23fedc 100644 --- a/airootfs/etc/sysusers.d/abrechenbarkeit.conf +++ b/airootfs/etc/sysusers.d/abrechenbarkeit.conf @@ -1 +1,6 @@ u abrechenbarkeit - "Abrechenbarkeit User Interface User" /home/abrechenbarkeit /usr/bin/nologin +m abrechenbarkeit render +m abrechenbarkeit video +m abrechenbarkeit input +m abrechenbarkeit audio +m abrechenbarkeit rtkit diff --git a/airootfs/usr/local/bin/app_main b/airootfs/usr/local/bin/app_main new file mode 100644 index 0000000..1d808bc --- /dev/null +++ b/airootfs/usr/local/bin/app_main @@ -0,0 +1,7 @@ +#!/usr/bin/fish +if test -e /sys/firmware/efi/efivars/AppUrl-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 + set url (cat /sys/firmware/efi/efivars/AppUrl-97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38 | tail -c +5) +else + set url /usr/local/share/webapps/no_config/index.html +end +/usr/bin/cage -d -- electron --ozone-platform=wayland $url diff --git a/airootfs/usr/local/share/webapps/no_config/index.html b/airootfs/usr/local/share/webapps/no_config/index.html new file mode 100644 index 0000000..4d9f698 --- /dev/null +++ b/airootfs/usr/local/share/webapps/no_config/index.html @@ -0,0 +1,32 @@ + + + + + + + No configuration + + + + +

No app configuration found

+

Please set the 97b6e7a4-b8a6-4d85-b7c4-0030bb5f2d38-AppUrl EFI variable to the entry point of your + application.

+

For more information see https://codeberg.org/metamuffin/abrechenbarkeit-sd

+ + + \ No newline at end of file diff --git a/packages.x86_64 b/packages.x86_64 index f22f9e3..4a7ed24 100644 --- a/packages.x86_64 +++ b/packages.x86_64 @@ -13,7 +13,6 @@ fish electron pipewire pipewire-alsa -pipewire-jack pipewire-pulse wpa_supplicant efivar diff --git a/profiledef.sh b/profiledef.sh index 4ff7a3a..7812350 100644 --- a/profiledef.sh +++ b/profiledef.sh @@ -17,4 +17,5 @@ bootstrap_tarball_compression=(zstd -c -T0 --long -19) file_permissions=( ["/etc/shadow"]="0:0:400" ["/usr/local/bin/configure_wpa"]="0:0:755" + ["/usr/local/bin/app_main"]="0:0:755" )