Run a NixOS closure as a microVM with desktop integration
Find a file
Val Packett a93ab32aea Pass MESA_LOADER_DRIVER_OVERRIDE to muvm-remote
The Zink override for Venus in muvm was being eaten by systemd.. until now
2025-11-28 03:55:50 -03:00
devShells Add sidebus integration 2025-11-14 06:20:44 -03:00
libkrun@8a14673941 Update libkrun and libkrunfw to latest upstream (merged MS_SHARED and EROFS) 2025-11-28 02:13:20 -03:00
libkrunfw@8a8c33f24f Update libkrun and libkrunfw to latest upstream (merged MS_SHARED and EROFS) 2025-11-28 02:13:20 -03:00
muvm@3ec4c90bbf Update muvm fork (proper pwbridge fix) 2025-11-28 02:13:20 -03:00
nixosModules Pass MESA_LOADER_DRIVER_OVERRIDE to muvm-remote 2025-11-28 03:55:50 -03:00
packages Update nixpkgs / dependencies (mesa-25.3.0) 2025-11-28 02:13:20 -03:00
.envrc Initial commit 2025-09-25 22:29:24 -03:00
.gitignore gitignore testvm 2025-11-28 02:13:20 -03:00
.gitmodules Update libkrun and libkrunfw to latest upstream (merged MS_SHARED and EROFS) 2025-11-28 02:13:20 -03:00
flake.lock Update nixpkgs / dependencies (mesa-25.3.0) 2025-11-28 02:13:20 -03:00
flake.nix Add fallback to our mesa package for non-NixOS hosts 2025-11-28 02:13:20 -03:00
LICENSE.md Initial commit 2025-09-25 22:29:24 -03:00
munix Add fallback to our mesa package for non-NixOS hosts 2025-11-28 02:13:20 -03:00
README.md Update muvm with PipeWire fix 2025-11-07 06:11:10 -03:00

munix

WIP: A microVM runner for NixOS systems with desktop integration, powered by muvm/libkrun.

Quick Start

1. Build a test VM:

nix build '.#nixosConfigurations.testvm-x86_64.config.system.build.toplevel' -o testvm

2. Run the VM:

nix run '.#munix' -- testvm

This will start an interactive bash session inside the microVM.

Run a specific command:

nix run '.#munix' -- testvm fastfetch

munix Options

  • --uid UID, -u UID - Set microVM UID (default: 1337)
  • --gid GID, -g GID - Set microVM GID (default: 1337)
  • --no-gpu - Disable GPU acceleration
  • --no-wayland - Disable Wayland support
  • --no-pipewire - Disable PipeWire audio
  • --x11 - Enable X11 support
  • --bind SRC DST - Bind mount SRC to DST in the VM
  • --ro-bind SRC DST - Read-only bind mount
  • --expose PATH - Expose PATH in the VM at the same location
  • --ro-expose PATH - Expose PATH read-only

Example with options:

nix run '.#munix' -- --no-gpu --ro-expose /home/user/data testvm htop

Development

Working on muvm & munix locally (not built into the nix store):

cd muvm && cargo build --locked --release
PATH=$PWD/muvm/target/release:$PATH ./munix testvm

Requirements

  • Linux system with KVM support (/dev/kvm)
  • For GPU acceleration: Kernel 6.13+ with compatible drivers (amdgpu, msm)
  • For Wayland: XDG_RUNTIME_DIR and WAYLAND_DISPLAY set

Known Issues