nixin-web/build-virtual-machine.md

20 lines
767 B
Markdown
Raw Permalink Normal View History

# Build images based on your generated configurations
2024-09-28 17:11:22 +00:00
Your Nix configurations are located in the `inventory` folder you can build and run the configuration file you want by running nixos-generate from the NixiN root folder. If the build succeeds, the last output is a command located in your nix store to run your vm.
2024-09-28 17:11:22 +00:00
## Images formats
Check <https://github.com/nix-community/nixos-generators?tab=readme-ov-file#supported-formats> to find available formats.
For example, for qemu-kvm runner
2024-09-28 17:11:22 +00:00
```bash
nixos-generate -c inventory/demo-configuration.nix -f vm
2024-09-28 17:11:22 +00:00
```
(nixos-generate is installed by nix-shell, check `shell.nix` to see the packages added)
## Cross compile
Check <https://github.com/nix-community/nixos-generators?tab=readme-ov-file#cross-compiling>.