nixpkgs/nixos/modules/virtualisation
Alyssa Ross 8ab2f09522 nixos/qemu-vm: fix infinite recursion
The virtualisation.directBoot.initrd option was added for netboot
images, but the assertion to check directBoot enabled if it was used
caused an infinite recursion if it was.  Minimal reproduction:

	import nixos/tests/make-test-python.nix ({ pkgs, ... }: {
	  name = "";

	  nodes = {
	    machine = { config, ...}: {
	      imports = [ nixos/modules/installer/netboot/netboot-minimal.nix ];

	      virtualisation.directBoot = {
	        enable = true;
	        initrd = "${config.system.build.netbootRamdisk}/${config.system.boot.loader.initrdFile}";
	      };
	    };
	  };
	  testScript = "";
	}) {}

The fix is to swap the two conditions, so that cfg.directBoot.enable
is checked first, and the initrd comparision will be short circuited.

This wasn't noticed during review because in earlier versions of the
virtualisation.directBoot patch, the assertion was accidentally in the
conditional above, so wasn't evaluated unless port forwarding was in
use.
2023-11-06 13:49:31 +01:00
..
podman nixos/podman: persist timer 2023-05-21 17:24:16 +02:00
amazon-ec2-amis.nix add release 23.05 AWS AMIs 2023-06-01 13:46:53 -04:00
amazon-image.nix ena: 2.8.0 -> 2.8.2 2023-01-31 03:31:05 +00:00
amazon-init.nix
amazon-options.nix nixos/virtualisation/*: replace deprecated types.string with types.str 2023-01-30 16:54:21 +01:00
anbox.nix nixos/anbox: use --daemon to squash warning 2023-09-05 10:09:44 +02:00
appvm.nix
azure-agent.nix
azure-bootstrap-blobs.nix
azure-common.nix nixos/*: remove boot.grub.version 2023-05-10 21:51:26 +02:00
azure-config-user.nix
azure-config.nix
azure-image.nix nixos/azure: add contents module option (#244364) 2023-10-08 19:35:14 +02:00
azure-images.nix
brightbox-config.nix
brightbox-image.nix services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
build-vm.nix
cloudstack-config.nix services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
container-config.nix
containerd.nix
containers.nix
cri-o.nix Merge pull request #213036 from SuperSandro2000/cri-o/update_storagedrivers 2023-04-15 16:27:50 +12:00
digital-ocean-config.nix services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
digital-ocean-image.nix
digital-ocean-init.nix
docker-image.nix
docker-rootless.nix
docker.nix nixos/virtualisation.docker: Do not assert 32 bit libraries available on ARM (#246179) 2023-08-11 10:49:25 +02:00
ec2-amis.nix
ec2-data.nix
ec2-metadata-fetcher.sh nixos/ec2: don't populate nonexistent metadata files 2023-02-26 23:25:09 +05:30
ecs-agent.nix
gce-images.nix
google-compute-config.nix nixos/virtualisation: allow configuring openssh root login on GCE 2023-09-16 19:43:02 -04:00
google-compute-image.nix
grow-partition.nix
hyperv-guest.nix
hyperv-image.nix
includes-to-excludes.py
incus.nix nixos/incus: shutdown instances on service stop 2023-11-02 19:54:11 -04:00
kubevirt.nix
kvmgt.nix
libvirtd.nix Merge pull request #232250 from YBeaugnon/libvirt-hooks 2023-08-09 15:07:52 +02:00
linode-config.nix nixos/virtualisation/linode-image: Migrate to new openssh options. 2023-02-12 13:06:11 +08:00
linode-image.nix maintainers: Update houstdav000 -> cyntheticfox 2023-03-30 18:50:29 -04:00
lxc-container.nix Merge pull request #260595 from adamcstephens/lxc/squashfs 2023-10-24 02:06:36 +02:00
lxc-image-metadata.nix nixos/lxd: add virtual-machine support, image and module 2023-09-03 20:06:44 -04:00
lxc-instance-common.nix nixos/lxd: add virtual-machine support, image and module 2023-09-03 20:06:44 -04:00
lxc.nix
lxcfs.nix
lxd-agent.nix nixos/lxd-agent: init module from distrobuilder generator 2023-08-18 22:28:59 +00:00
lxd-virtual-machine.nix nixos/lxd: add virtual-machine support, image and module 2023-09-03 20:06:44 -04:00
lxd.nix nixos/lxd: fix ui.enable desc 2023-10-12 15:24:01 +02:00
multipass.nix nixos/multipass: don't start until online 2023-04-14 11:27:57 +01:00
nixos-containers.nix nixos/containers: use latest stateVersion as example 2023-10-27 12:56:12 +03:00
oci-common.nix nixos/virtualisation: use mkDefault in networking.useNetworkd in oci-common 2023-09-28 22:05:34 +01:00
oci-config-user.nix oci-image: init scripts to build and upload image 2023-09-21 22:15:22 +01:00
oci-containers.nix Merge pull request #258299 from Arcayr/virtualisation-hostname 2023-11-06 10:44:26 +13:00
oci-image.nix nixos/virtualization: Allow building EFI OCI images 2023-09-21 22:57:38 +01:00
oci-options.nix nixos/virtualisation: always use EFI for OCI 2023-09-21 22:57:39 +01:00
openstack-config.nix services.openssh: support freeform settings (#193757) 2023-01-15 16:32:46 +01:00
openstack-metadata-fetcher.nix
openstack-options.nix nixos/virtualisation/*: replace deprecated types.string with types.str 2023-01-30 16:54:21 +01:00
openvswitch.nix
parallels-guest.nix systemd.services.prlshprint: fix type 2023-04-18 18:55:47 +03:00
proxmox-image.nix revert(proxmox-image): pull request #246120 from jakeschurch/add-proxmox-image-addl-disk-size-override 2023-08-02 15:01:44 -04:00
proxmox-lxc.nix
qemu-guest-agent.nix
qemu-vm.nix nixos/qemu-vm: fix infinite recursion 2023-11-06 13:49:31 +01:00
rosetta.nix modules/rosetta: configure nix build sandbox to use rosetta 2023-05-10 14:28:50 -04:00
spice-usb-redirection.nix
vagrant-guest.nix nixos/vagrant-guest: Set security.sudo-rs.wheelNeedsPassword too 2023-11-06 12:39:04 +01:00
vagrant-virtualbox-image.nix
virtualbox-guest.nix
virtualbox-host.nix treewide: use pkgs.config instead of config.nixpkgs.config 2023-10-01 20:48:40 +03:00
virtualbox-image.nix nixos/virtualbox-image: remove the raw image trick 2023-03-04 13:39:50 +03:00
vmware-guest.nix vmware-guest module: work under aarch64 2023-07-07 15:40:29 -04:00
vmware-host.nix
vmware-image.nix
waydroid.nix
xe-guest-utilities.nix
xen-dom0.nix
xen-domU.nix nixos/*: remove boot.grub.version 2023-05-10 21:51:26 +02:00