diff options
author | Robert Hensing <robert@roberthensing.nl> | 2021-12-17 13:15:55 +0100 |
---|---|---|
committer | Robert Hensing <robert@roberthensing.nl> | 2021-12-17 13:19:16 +0100 |
commit | f72432aeb2a3aa1d75bd56204571fb394fcc9abb (patch) | |
tree | ed80b0b7f8e11d4cf4ce05f6fc76052548c2a5e8 /nixos/default.nix | |
parent | 8fd49c116bcd256263c7aad8ca5d4b7fa10d4ca2 (diff) |
nixos: Move build-vm into virtualisation.vmVariant
... which is like a specialisation, but for nixos-rebuild build-vm
Diffstat (limited to 'nixos/default.nix')
-rw-r--r-- | nixos/default.nix | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/nixos/default.nix b/nixos/default.nix index 01605e1d5772..27a0fd73ecd7 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -9,24 +9,6 @@ let modules = [ configuration ]; }; - # This is for `nixos-rebuild build-vm'. - vm = eval.extendModules { - modules = [ ./modules/virtualisation/qemu-vm.nix ]; - }; - - # This is for `nixos-rebuild build-vm-with-bootloader'. - vmWithBootLoader = vm.extendModules { - modules = [ - ({ config, ... }: { - _file = "nixos/default.nix##vmWithBootLoader"; - virtualisation.useBootLoader = true; - virtualisation.useEFIBoot = - config.boot.loader.systemd-boot.enable || - config.boot.loader.efi.canTouchEfiVariables; - }) - ]; - }; - in { @@ -34,7 +16,7 @@ in system = eval.config.system.build.toplevel; - vm = vm.config.system.build.vm; + vm = eval.config.virtualisation.vmVariant.system.build.vm; - vmWithBootLoader = vmWithBootLoader.config.system.build.vm; + vmWithBootLoader = eval.config.virtualisation.vmVariantWithBootLoader.system.build.vm; } |