diff --git a/ci/Dockerfile b/ci/Dockerfile index 3c7d506..ece3546 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -10,6 +10,7 @@ RUN dnf install -y \ findutils \ make \ openssh-clients \ + python3-pip \ rsync \ squashfs-tools \ tar \ diff --git a/mkrootfs.sh b/mkrootfs.sh index 1201bfa..c8a7b91 100644 --- a/mkrootfs.sh +++ b/mkrootfs.sh @@ -19,7 +19,6 @@ echo install_weak_deps=False >> "${destdir}"/etc/dnf/dnf.conf dnf --installroot "${destdir}" install -y \ bcm2711-firmware \ dracut-network \ - firefox \ hostname \ kmod \ mesa-dri-drivers \ @@ -65,6 +64,21 @@ chroot "${destdir}" systemctl enable \ systemd-timesyncd \ xinit@user +if ! [ -f "${destdir}"/usr/local/bin/playwright ]; then + python3 -m pip \ + install \ + --prefix "${destdir}"/usr/local \ + playwright +fi +if ! [ -d "${destdir}"/usr/local/ms-playwright ]; then + py_site_dir=$( + "${destdir}"/usr/bin/python3 -c 'import site;print(site.getsitepackages()[0])' + ) + PLAYWRIGHT_BROWSERS_PATH="${destdir}"/usr/local/ms-playwright \ + PYTHONPATH="${destdir}${py_site_dir}" \ + python3 -m playwright install firefox +fi + umask 0022 mksquashfs "${destdir}" "${destdir}/boot/${dest}" \ -comp lz4 \ diff --git a/overlay/etc/systemd/system/xinit@.service b/overlay/etc/systemd/system/xinit@.service index 0d9a5cb..f051747 100644 --- a/overlay/etc/systemd/system/xinit@.service +++ b/overlay/etc/systemd/system/xinit@.service @@ -14,7 +14,7 @@ TTYPath=/dev/tty7 StandardInput=tty StandardOutput=journal StandardError=journal -ExecStart=/usr/bin/startx +ExecStart=/usr/bin/startx -- -nocursor Restart=always [Install] diff --git a/overlay/etc/systemd/user/basementhud.service b/overlay/etc/systemd/user/basementhud.service new file mode 100644 index 0000000..4af7fb8 --- /dev/null +++ b/overlay/etc/systemd/user/basementhud.service @@ -0,0 +1,7 @@ +[Unit] +Description=Basement HUD + +[Service] +Type=simple +Environment=PLAYWRIGHT_BROWSERS_PATH=/usr/local/ms-playwright +ExecStart=/usr/local/bin/basementhud diff --git a/overlay/etc/systemd/user/firefox.service b/overlay/etc/systemd/user/firefox.service deleted file mode 100644 index ee4ac29..0000000 --- a/overlay/etc/systemd/user/firefox.service +++ /dev/null @@ -1,9 +0,0 @@ -[Unit] -Description=Firefox web browser - -[Service] -Type=simple -ExecStart=/usr/bin/firefox -Restart=always -StandardInput=null -StandardOutput=journal diff --git a/overlay/etc/systemd/user/graphical.target b/overlay/etc/systemd/user/graphical.target deleted file mode 100644 index 3830c13..0000000 --- a/overlay/etc/systemd/user/graphical.target +++ /dev/null @@ -1,4 +0,0 @@ -[Unit] -Description=Graphical Interface -After=default.target -AllowIsolate=yes diff --git a/overlay/etc/systemd/user/graphical.target.wants/firefox.service b/overlay/etc/systemd/user/graphical.target.wants/firefox.service deleted file mode 120000 index 9b4b5e4..0000000 --- a/overlay/etc/systemd/user/graphical.target.wants/firefox.service +++ /dev/null @@ -1 +0,0 @@ -../firefox.service \ No newline at end of file diff --git a/overlay/home/user/.xinitrc b/overlay/home/user/.xinitrc index b6ceb1a..2f3a150 100644 --- a/overlay/home/user/.xinitrc +++ b/overlay/home/user/.xinitrc @@ -3,5 +3,5 @@ xset s off xset -dpms systemctl --user import-environment DISPLAY -systemctl --user start graphical.target +systemctl --user start basementhud.service exec openbox diff --git a/overlay/usr/local/bin/basementhud b/overlay/usr/local/bin/basementhud new file mode 100755 index 0000000..fd77077 --- /dev/null +++ b/overlay/usr/local/bin/basementhud @@ -0,0 +1,10 @@ +#!/bin/sh + +python3 -m ensurepip +python3 -m pip install -U pip +python3 -m pip install \ + --user \ + --find-links https://files.pyrocufflink.blue/wheels/voonex \ + --upgrade \ + voonex +exec python3 -m voonex