Munix
1 min read
A microVM runner for NixOS systems with desktop integration, powered by muvm/libkrun.
Quick Start
1. Build a test VM:
sh
nix build '.#nixosConfigurations.testvm-x86_64.config.system.build.toplevel' -o testvm
2. Run the VM:
sh
nix run '.#munix' -- testvm
This will start an interactive bash session inside the microVM.
Run a specific command:
sh
nix run '.#munix' -- testvm fastfetch
Create a custom VM: Use the template to bootstrap a new munix project:
sh
mkdir my-vm && cd my-vm
nix flake init -t 'git+https://git.clan.lol/clan/munix#musictest'
git init && git add flake.nix
nix run
This creates a flake.nix with a music player demo (MPD + Euphonica). Edit the module to customize your VM.
munix Options
| Option | Description |
|---|---|
--uid UID | Set microVM UID (default: 1337) |
-u UID | Set microVM UID (default: 1337) |
--gid GID | Set microVM GID (default: 1337) |
-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:
sh
nix run '.#munix' -- --no-gpu --ro-expose /home/user/data testvm htop