cd ../projects

Personal project · NixOS

Nix VM.

An easy way to get a pre-configured NixOS VM up and running.

A small, repeatable starting point

Nix VM is a minimal NixOS configuration for testing inside virtual machines. The idea is straightforward: get a VM into a useful, known state without repeating the same installation and configuration steps each time.

The project brings the system configuration, disk layout and user environment together in one repository. Once the VM is running, those files provide a starting point for trying packages, services or changes to the configuration.

What it sets up

  • A flake-based NixOS system, with Nix command and flake support enabled.
  • A declarative disk layout using disko, with an ext4 root filesystem and EFI boot on the VM’s /dev/vda disk.
  • A user environment managed with Home Manager, alongside the system configuration.
  • A small set of command-line tools, including Git, curl, rsync and Neovim.
  • SSH access and a sudo-capable user, so the VM can be used from a terminal.

From live ISO to installed VM

Start the VM from a NixOS live ISO, then run the installer described in the README. It clones the repository, applies the disk layout, generates a hardware configuration for the guest, and installs NixOS from the flake. Reboot when it finishes.

The installer formats /dev/vda, so it belongs in a VM with a disk you are happy to erase. The supplied login and password-based SSH are convenient defaults for a test guest; change them before using the VM outside that setting.

The README has the installation commands, including the individual steps if you prefer to run them yourself.

Make it your own

The configuration is split into a few files, each with a clear purpose:

It is a small personal project with a simple job: make a fresh NixOS test VM easier to set up, then leave the configuration easy to inspect and adapt.