SuperSandro2000 / multipass-flake

A Nix flake for Canonical's Multipass

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multipass-flake

This is a Nix Flake for Canonical's Multipass. You can use this flake to build/install the multipass package, or you can use it with your NixOS system to enable multipass as a virtualisation provider.

This flake is not supported or endorsed by Canonical in any way, it is just a personal project.

Use this flake on NixOS

  1. Add the flake as an input to your system config flake:
...
inputs = {
    multipass = {
      url = "github:jnsgruk/multipass-flake";
      inputs.nixpkgs.follows = "nixpkgs";
    };
}
...
  1. Make sure the module is added to your system configuration:
...
nixosConfigurations = {
    thor = nixpkgs.lib.nixosSystem {
        ...
        modules = [
            multipass.nixosModule."x86_64-linux"
            ...
        ];
    };
};
...
  1. Enable multipass in your NixOS system configuration:
virtualisation.multipass.enable = true;
  1. Reload your nix configuration, you may need to run systemctl start multipass

Caveats

Not many. I don't think this will work out of the box on non-amd64 machines without tweaking the patches/paths for the OVMF/bios files for QEMU. I don't have access to such machines and have not tested it.

About

A Nix flake for Canonical's Multipass

License:Apache License 2.0


Languages

Language:Nix 100.0%