Using nixarchy.microvm
A walkthrough, from installing the plugin to fixing the usual problems. The reference tables (every key, every setting, IPC) are in the README.
What it is
nixarchy can run NixOS inside small virtual machines, sharing the host’s own
/nix/store so there is nothing to download or install. There are two kinds:
- a disposable VM is made with
nixarchy vm create, lives under~/.local/state/nixarchy/microvm/<name>/, and needs no root and no rebuild; - a permanent VM is declared in your configuration as
programs.nixarchy.services.microvm.machines.<name>, boots with the host under systemd, and can forward an SSH port.
This plugin puts both on the Omarchy bar and behind a key. It lists them, and
lets you start, stop, create, edit and delete them without remembering the
vocabulary of either. Two things stay in a terminal by design: a VM’s console,
and nixarchy-apply, which rebuilds your system.
Requirements
nixarchy-vmon yourPATH, withlist --json,run --detach,consoleandset-template(nixarchy#762, shipped 2026-09-19): it comes with nixarchy.systemctlandjournalctlfor permanent VMs.timeout,findandcat, to read presets.omarchy-launch-tui,omarchy-launch-floating-terminal-with-presentationandwl-copy: Omarchy ships all three.- nixarchy.pkg, with
opt replace(nixarchy-pkg#19, shipped 2026-09-19), for permanent VMs. This plugin writes their lines through that plugin’s writers, so it must be installed at~/.config/omarchy/plugins/nixarchy.pkg. Without it, the permanent half of the create form says so and the keys that need it stay hidden. claudeas your default agent, for AI assist (omarchy default agent claude). Any other agent hides the feature with a note; codex is a follow-up.
A command that is missing fails silently inside the shell, so check these first when nothing happens.
Install on NixOS (nixarchy)
Add the flake as an input and hand its package to nixarchy:
inputs.nixarchy-microvm = {
url = "github:olafkfreund/nixarchy-microvm";
inputs.nixpkgs.follows = "nixpkgs";
};
programs.nixarchy.plugins."nixarchy.microvm".src =
inputs.nixarchy-microvm.packages.${pkgs.stdenv.hostPlatform.system}.default;
Rebuild, then enable it once: omarchy plugin enable nixarchy.microvm. The
glyph lands on the right side of the bar.
nixarchy will not replace a real directory at
~/.config/omarchy/plugins/nixarchy.microvm. If you installed it by hand
before, remove that directory first.
Install without Nix
omarchy plugin add https://github.com/olafkfreund/nixarchy-microvm
omarchy plugin enable nixarchy.microvm
The bar popup
Click the glyph, or run omarchy shell nixarchy.microvm.bar open.
The glyph is:
- accent-coloured while a VM runs;
- dim when none do;
- red when a permanent VM’s unit has failed.
Middle-click refreshes.
The popup lists your VMs, running ones first. Each row shows:
- a state dot: filled when running, hollow when stopped, red when failed;
- the name and a badge saying disposable or permanent;
- the template, and where the VM comes from when that matters (declared in your flake, or apps.nix, edited by hand);
- the state: stopped, not built yet, pending apply, removed, pending apply.
Buttons on the right of each row do the same as the keys. A key that does not apply to a row is not there, and the line above the footer says why, for example “enter: set an SSH port and key to get a console”.
Size and text
Both surfaces size themselves from the screen they open on and from your
desktop text size, so a wider monitor gets a wider card and a longer list, and
omarchy-display-text-size moves everything together. The menu is not
magnified: its text is laid out at the size it is drawn, so it stays as sharp
as the rest of the desktop. If you want it bigger, raise the desktop text size
rather than looking for a setting here.
The menu
The menu has the same list, form and log, on a bigger card. It opens centred near the top of the focused screen, without dimming it, over whatever you were working in. It holds the keyboard until you close it with Esc, or with a click outside the card on the same screen:
omarchy-shell shell toggle nixarchy.microvm '{}'
omarchy-shell shell toggle nixarchy.microvm '{"create":true}' # straight into the form
Add it to the Omarchy menu
Paste the row in share/omarchy-menu.jsonc into
~/.config/omarchy/extensions/omarchy-menu.jsonc. After that, searching for
vm, sandbox or microvm in the Omarchy menu (Super+Alt+Space) finds it.
Give it a key
The plugin ships its key in microvm-binds.lua: SUPER + ALT + V, free in
Omarchy’s defaults. It has to sit in ~/.config/hypr/:
- with Nix, the flake’s Home Manager module writes it
(
imports = [ inputs.nixarchy-microvm.homeManagerModules.default ];, andprograms.nixarchy-microvm.keybindingto pick another chord, ornull); - without Nix, copy it from the plugin folder:
cp ~/.config/omarchy/plugins/nixarchy.microvm/microvm-binds.lua ~/.config/hypr/.
Then add one line to ~/.config/hypr/bindings.lua:
pcall(require, "hypr.microvm-binds")
Super+K, Omarchy’s key bindings menu, then lists it as “MicroVMs”. To see what
your own configuration has on that chord: hyprctl binds -j | jq '.[] | select(.key=="V")'.
Bar and menu are one thing
Both surfaces show the same state. A build started in the menu shows up in the popup’s log, and while anything changes, a start or delete from the other surface is refused. Closing a surface never stops a job.
The list refreshes every few seconds and sorts running machines first, so rows
move on their own. The cursor is tied to the machine you selected rather than
to a position in the list: start the VM you are on and the highlight travels
with it as it jumps to the top, so pressing s again stops that same machine
and not whatever slid into its place. If the selected machine leaves the list —
you deleted it, or the filter no longer matches it — the cursor stays at that
position and takes whichever row moves up.
The overview
Press v in the list (with the filter not focused) to switch between the list
and the overview, or turn on Open on the overview (overviewByDefault, off
by default) so the panel opens there. Both views show the same VMs, and the
same cursor, mouse, action buttons and keys work in both.
Each card shows:
- the name, and the disposable or permanent badge;
- the template, and where the VM comes from when that matters;
- the status when the VM is not running cleanly (stopped, not built yet, pending apply, removed, pending apply, or the verb in progress);
- for a running VM:
up <uptime> · <memory>in binary units (MiB/GiB), its configured size, and a CPU sparkline withcpu <n>%, where100%is one core; configured <memory> · <cores> coreswhen the VM’s size is known. A non-running VM with an unapplied change adds(pending); a running VM with a pending edit hides the configured line until you apply, because the new size is not what is running.
The header shows host <used> used · VMs <share> · <n> running, with · <n>
pending and · <n> failed when there are any.
What the markers mean:
—: a reading is not available yet (for example, a command failed or was refused, or no running VM could be read). The CPU percentage is a difference between two readings, so it appears from the second poll; the sparkline needs two percentages, so it appears from the third. Nothing is ever shown as0when it is unknown, and a failed read clears its old numbers rather than leaving them frozen.(partial)after the VMs’ memory total: some running VMs answered and at least one did not, so the sum covers only the readable ones.
Readings (systemctl show for running units and /proc/meminfo for the host)
are taken only while a surface is open on the overview. Closing the panel,
switching back to the list with v, or opening the form or the log stops them
and clears the readings.
Everyday tasks
A throwaway shell
- Press
c(or run thecreateIPC / menu payload). The form opens at Name, with Kind set to disposable: type a name (letters, digits,_and-, starting with a letter). - Tab to Template. Press ↓ to move into the list, which shows each
template’s note, and Enter to pick one;
shellis the default. - Start it now is on by default (Space flips it off if you only want to create the VM stopped).
- Press Enter. The VM is created and starts in the background under one lock,
and the panel switches to the log, showing the create output followed by
its first build (a minute or two, much less once cached). Esc goes back to
the list without stopping anything, and
oshows the log again. The row gets a filled dot once the VM runs. - Press Enter on the running row. Its console opens in a terminal, at the guest’s prompt. Ctrl-] leaves the console, and the VM keeps running.
sstops a running VM or starts a stopped one.mon a stopped one changes its template.xdeletes it and its state directory, after asking (if it is running,xstops it first and then deletes it).
From a preset
Presets are JSON files in ~/.config/nixarchy/microvm/presets/; the
README
has the format.
- Press
c. If there are presets, a Start from a preset row sits above Name, with1 label 2 labelunder it. It is the top row: press↑until the cursor is on it. - Press
1-9. The form is filled from that preset, and the cursor goes to Name. A pick replaces everything you typed. - Type a name and press Enter, as for any VM.
With no VMs at all, 1-9 on the empty list does the same in one key (not
while the filter box has focus). The keys follow file-name order. Presets are
read when a surface first opens and on u; a form opened straight from a
closed plugin (the create payload) shows them from the next open.
A permanent machine with SSH
- Press
c, Shift+Tab to Kind, and press Space to flip it to permanent. - Fill in the name (lower-case letters, digits and
-, starting with a letter), the template, and the rest:- Start at boot: on by default.
- Memory in MiB and Cores.
- SSH and shares: off by default, so the form stays short. Press Space
to open the three fields below (it also opens on its own whenever you edit
a VM that uses them, the agent fills one, or Enter flags an error in one):
- SSH port on the host: empty means console only. With a port, the
guest runs sshd on it. Each permanent VM in
apps.nixneeds its own host port; reusing one says “Port N is already used by". A machine declared elsewhere in your flake is not checked. - SSH public key: press ↓ to pick one of your
~/.ssh/*.pub. The guest’sdevuser has no password, so a port without a key reaches a daemon nobody can log into; the form warns. - Shares:
host:guestpairs, space-separated, such as~/src:/mnt/src. The guest path must be absolute and cannot be/,/nixor/mnt/host, which the guest already uses, and two shares on the same VM cannot use the same guest path (“Two shares mount at"). Neither side may contain a `.` or `..` segment — write the path you mean in full rather than reaching through a parent. `~/` needs a plain absolute `HOME`; if yours contains anything unusual, spell the host path out instead.
- SSH port on the host: empty means console only. With a port, the
guest runs sshd on it. Each permanent VM in
- Press Enter. The review shows the exact line that will go into
~/.config/nixarchy/apps.nix, the two commands that write it (themicrovmservice row, then the line), and a reminder that applying rebuilds the whole system. Enter writes it; Esc goes back to the form. - Once it is written, the surface that submitted it asks:
Apply now? nixarchy-apply rebuilds the whole system from apps.nix, in a terminal.(Cancel is the default; Apply oryruns the samenixarchy-applyasa). Until you apply, the row says pending apply and the footer offersa. After the rebuild, the unit exists:sstarts and stops it,rrestarts it,lfollows its journal, and Enter opensssh -p <port> dev@localhostin a terminal.
To add NixOS modules beyond the SSH key, edit the line in apps.nix by hand.
The plugin then shows the VM as apps.nix, edited by hand and stops
rewriting it; it can still be started, stopped and watched.
Edit
m on a permanent VM opens the same form with its values filled in (and SSH
and shares already open if the VM has a port, a key or shares); Enter goes to
the review again, which says opt replace, rewrites the line in place, and
asks Apply now?. While that change waits for apply, the VM’s SSH console is
hidden with “apply the queued change first”. m on a stopped disposable VM
changes its template.
Delete
x asks first, and Cancel is the default answer. Answer from the keyboard
with y or enter for yes, n or esc for no — the question takes the
keyboard wherever you were, including out of the filter box. For a stopped
disposable VM it deletes the VM and everything in its state directory. For a
running disposable VM it asks `Stop and delete