Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Usage

Magic Nix VFS demo

Requirements:

  • a computer or VM
  • with a wired Internet connection with automatic DHCP configuration
  • and at least 8GB of RAM (for the destkop variant) or 2GB (for the CLI variant)

Download:

Instructions:

  1. Download the ISO file above.

  2. If booting a physical computer, burn ISO to a CD-ROM or USB pendrive.

  3. Boot computer or VM from this disk.

    Here is an example command to run within a Qemu virtual machine:

    qemu-system-x86_64 -m 8G -enable-kvm -smp 2 -cdrom magic-nixos-demo-v1.iso
    
  4. Select the variant of the demo to run: full desktop with Cinnamon, or CLI-only. The CLI variant will boot faster but has less functionality.

  5. If using the CLI variant, login with username root and password root.

  6. Explore the system.

Running programs:

If you are running the desktop version of the demo, note that no extra programs are installed by default. However, all binary packages ever built by the NixOS project and present on cache.nixos.org can be run simply by launching their full path. For instance, try launching one of the following commands:

  • /nix/store/kq5pl1xnpzmkh1x6dzy857l0929bkgx5-thunderbird-152.0.1/bin/thunderbird
  • /nix/store/4b7ydwmf41lzcha054wf4m5nki4fb2ml-inkscape-1.4.4/bin/inkscape

Using the magicnixvfs NixOS module

You can use Magic Nix VFS on your own system thanks to the NixOS module provided in this repository, but consider such a setup unstable and use it only for testing purposes.

To do so, you must build your system configuration as a flake. Here is an example flake.nix for doing so:

{
  description = "An example system configuration that imports the Magic Nix VFS module";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
    magicnixvfs.url = "git+https://git.deuxfleurs.fr/lx/magic-nix-vfs.git";
  };

  outputs = { self, nixpkgs, magicnixvfs, ...}: {
    nixosConfigurations."example" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        magicnixvfs.nixosModules."magicnixvfs"
        ./configuration.nix
      ];
    };
  };
}

For usage examples, you can read the configuration.nix file from the netboot demo. The options for configuring the magicnixvfs module are listed on the configuration reference page.

Note that this works for netbooting when the NixOS configuration is built on another machine and uploaded to a cache server. If boot.magicnixvfs.statePath (default: /var/lib/magicnixvfs) is mounted on a local disk, Magic Nix VFS will download and store there all files necessary to boot and run the system when it first boots. Future boots will then be much faster, with all files already available locally.

Note that since Magic Nix VFS does not yet have write support, it is not yet possible to build the NixOS configuration on the same machine that will run it. This also means that using the standard NixOS installation procedure is not possible.