1 { config, extendModules, lib, ... }:
8 vmVariant = extendModules {
9 modules = [ ./qemu-vm.nix ];
12 vmVariantWithBootLoader = vmVariant.extendModules {
15 _file = "nixos/default.nix##vmWithBootLoader";
16 virtualisation.useBootLoader = true;
17 virtualisation.useEFIBoot =
18 config.boot.loader.systemd-boot.enable ||
19 config.boot.loader.efi.canTouchEfiVariables;
27 virtualisation.vmVariant = mkOption {
29 Machine configuration to be added for the vm script produced by `nixos-rebuild build-vm`.
31 inherit (vmVariant) type;
36 virtualisation.vmVariantWithBootLoader = mkOption {
38 Machine configuration to be added for the vm script produced by `nixos-rebuild build-vm-with-bootloader`.
40 inherit (vmVariantWithBootLoader) type;
50 vm = lib.mkDefault config.virtualisation.vmVariant.system.build.vm;
51 vmWithBootLoader = lib.mkDefault config.virtualisation.vmVariantWithBootLoader.system.build.vm;
57 meta.buildDocsInSandbox = false;