--- /dev/null
+#!/bin/bash
+
+mkdir /build
+ls -alr /build
+chown -R nobody:nobody /build
+chmod -R g+ws /build
+su -l nobody --shell=/bin/bash <<EOF
+export HOME=/build # make yarn happy about having a writeable homedir
+git clone https://aur.archlinux.org/jellyfin.git /build/makepkg
+cd /build/makepkg
+makepkg --noarchive
+EOF
+
+ls -la /build/makepkg
+cp -dr --no-preserve='ownership' /build/makepkg/pkg/jellyfin-{server,web}/* $DESTDIR
--- /dev/null
+[Distribution]
+Distribution=arch
+Mirror=http://archlinux.uk.mirror.allworldit.com/archlinux/
+
+[Output]
+Output=jellyfin
+Format=subvolume
+
+[Packages]
+WithNetwork=yes
+BuildPackages=
+ base-devel
+ dotnet-sdk>=3
+ git
+ python2
+ yarn
+
+Packages=
+ aspnet-runtime>=3
+ dotnet-runtime>=3
+ ffmpeg
+ libva-intel-driver
+ sqlite
--- /dev/null
+[Service]
+# allow binding servince to port 80
+AmbientCapabilities=CAP_NET_BIND_SERVICE
--- /dev/null
+u jellyfin - "Jellyfin Media Server" /var/lib/jellyfin
--- /dev/null
+[Network]
+Bridge=br0
+
+[Files]
+Bind=/var/lib/jellyfin
+
+Bind=/mnt/fook/Movies
+Bind=/mnt/fook/Series
+
+BindReadOnly=/dev/dri/renderD128
--- /dev/null
+#!/bin/bash
+
+# skip if in build mode
+if [[ "x$1" = "xbuild" ]]; then
+ exit
+fi
+
+passwd -d root
+systemctl enable jellyfin.service
--- /dev/null
+[Service]
+# access gpu for rendering
+DeviceAllow=char-drm rw