Skip to content

2.3.0

Latest

Choose a tag to compare

@Mic92 Mic92 released this 25 Nov 18:35
· 1 commit to main since this release

Highlights

Shared directories now use virtiofs instead of 9p (#170, #178 by @ners)

Home, the nix profile and nixos-shell.mounts.extraMounts are now shared with the guest via virtiofs, following the same move in the nixpkgs qemu-vm module. This is noticeably faster than 9p and behaves more like a local file system.

New --extra-module flag (#155 by @benjamb)

Layer additional NixOS modules on top of a VM definition, e.g. a project-specific config on top of a base VM from your system flake. Can be passed multiple times and works with and without --flake:

$ nixos-shell --flake github:Mic92/nixos-shell#vm --extra-module ./project.nix
$ nixos-shell vm.nix --extra-module ./private.nix

Breaking changes

  • nixos-shell.mounts.cache takes virtiofs cache modes now. The old 9p values (none, loose, fscache, mmap) are no longer accepted:
    • never: no guest-side caching, host changes are visible immediately (replaces none)
    • auto (default): cached but revalidated after a short timeout
    • always: fastest, but host changes are not propagated to the guest
  • The per-mount cache option of nixos-shell.mounts.extraMounts.<name> was removed; the cache mode is set globally through nixos-shell.mounts.cache.
  • A recent nixpkgs is required: the qemu-vm module has to be virtiofs-based and provide virtualisation.sharedDirectories.<name>.cache. Older nixpkgs revisions no longer work with this release.
  • nixos-shell no longer sets virtualisation.msize, as it only applied to 9p.

New Contributors

Full Changelog: 2.2.0...2.3.0