I finally figured it out:
- First, at least for pinnacle,
seatdhas to be enabled:
services.seatd.enable = true;
- The following qemu launcher config is needed:
virtualisation.vmVariant.virtualisation.qemu.options = [
"-display gtk,gl=on"
];
- Along with the following override:
}).config.system.build.vm.overrideAttrs
(oldAttrs: {
# From some reason adding another -device makes pinnacle not
# launch, so we substitute the gpu device with an opengl enabled
# device manually. TODO: Fix this in Nixpkgs more elegantly.
buildCommand = oldAttrs.buildCommand + ''
# Remove a symlink and substitue the contents of it with out
# virtio-gpu-gl-pci fix
original=$(readlink $out/bin/run-*)
basename=$(basename $out/bin/run-*)
rm $out/bin/run-*
substitute "$original" "$out/bin/$basename" \
--replace-fail virtio-gpu-pci virtio-gpu-gl-pci
chmod +x $out/bin/run-*
'';
The full config example at this point in time is available here:
I hopefully will post a link to the GitHub PR that will fix this once I got it ready.