microsandbox-cli.nix

June 1, 2026 ยท View on GitHub

Nix flake for the microsandbox CLI.

NOTE: This repository is not affiliated with or endorsed by the upstream project. It is just a small helper I made for myself, and that could be useful to others that also prefer managing developer tooling using nix. Refer to the upstream project for the actual tool and its documentation.

Flake Outputs

  • msb: built from source with crane on x86_64-linux
  • msb-prebuilt: upstream prebuilt binary package
  • default: aliases msb

Quick Start

Build the source package:

nix build .#msb

Run it directly:

nix run .#msb -- run ubuntu

Use the prebuilt package instead:

nix build .#msb-prebuilt

Install

Install with nix profile:

nix profile install github:renato-zannon/microsandbox-cli.nix#msb

Install with Home Manager:

{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    home-manager.url = "github:nix-community/home-manager";
    microsandbox-cli.url = "github:renato-zannon/microsandbox-cli.nix";
  };

  outputs = { self, nixpkgs, home-manager, microsandbox-cli, ... }:
    {
      homeConfigurations."your-user" = home-manager.lib.homeManagerConfiguration {
        pkgs = import nixpkgs { system = "x86_64-linux"; };
        modules = [
          {
            home.packages = [ microsandbox-cli.packages.x86_64-linux.msb ];
          }
        ];
      };
    };
}

Notes

  • The source build is currently supported on x86_64-linux only.
  • The prebuilt package is available for x86_64-linux and aarch64-linux.
  • msb also installs a microsandbox binary alias.

Use As An Overlay

inputs.microsandbox-cli.url = "github:renato-zannon/microsandbox-cli.nix";

outputs = { self, nixpkgs, microsandbox-cli, ... }:
  {
    overlays.default = microsandbox-cli.overlays.default;
  };