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
- Add the flake as an input to your system config flake:
...
inputs = {
multipass = {
url = "github:jnsgruk/multipass-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
}
...
- Make sure the module is added to your system configuration:
...
nixosConfigurations = {
thor = nixpkgs.lib.nixosSystem {
...
modules = [
multipass.nixosModule."x86_64-linux"
...
];
};
};
...
- Enable multipass in your NixOS system configuration:
virtualisation.multipass.enable = true;
- 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.