slp / krun

krun - run programs from your system in a microVM
MIT License
25 stars 7 forks source link

Issues with `/run` on NixOS #37

Open RossComputerGuy opened 2 weeks ago

RossComputerGuy commented 2 weeks ago

On NixOS, we use /run for many runtime things such as symlinking the current system state to /run/current-system. This means the system "installed" packages will not be accessible unless /run/current-system is available. We also have the OpenGL drivers symlinked to /run/opengl-driver. Without that symlink being available, GPU related access via Mesa is not possible. Since /run isn't shared to krun, this means system packages and OpenGL are both not available.

Possible solution is to check if NIXOS_SYSTEM is an env var set and to mount the value of it to /run/current-system. A similar solution could be done for OpenGL.