mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-11-12 10:43:16 +01:00
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.
|
||
|---|---|---|
| .. | ||
| podman | ||
| amazon-ec2-amis.nix | ||
| amazon-image.nix | ||
| amazon-init.nix | ||
| amazon-options.nix | ||
| anbox.nix | ||
| appvm.nix | ||
| azure-agent.nix | ||
| azure-bootstrap-blobs.nix | ||
| azure-common.nix | ||
| azure-config-user.nix | ||
| azure-config.nix | ||
| azure-image.nix | ||
| azure-images.nix | ||
| brightbox-config.nix | ||
| brightbox-image.nix | ||
| build-vm.nix | ||
| cloudstack-config.nix | ||
| container-config.nix | ||
| containerd.nix | ||
| containers.nix | ||
| cri-o.nix | ||
| digital-ocean-config.nix | ||
| digital-ocean-image.nix | ||
| digital-ocean-init.nix | ||
| docker-image.nix | ||
| docker-rootless.nix | ||
| docker.nix | ||
| ec2-amis.nix | ||
| ec2-data.nix | ||
| ec2-metadata-fetcher.sh | ||
| ecs-agent.nix | ||
| gce-images.nix | ||
| google-compute-config.nix | ||
| google-compute-image.nix | ||
| grow-partition.nix | ||
| hyperv-guest.nix | ||
| hyperv-image.nix | ||
| includes-to-excludes.py | ||
| incus.nix | ||
| kubevirt.nix | ||
| kvmgt.nix | ||
| libvirtd.nix | ||
| linode-config.nix | ||
| linode-image.nix | ||
| lxc-container.nix | ||
| lxc-image-metadata.nix | ||
| lxc-instance-common.nix | ||
| lxc.nix | ||
| lxcfs.nix | ||
| lxd-agent.nix | ||
| lxd-virtual-machine.nix | ||
| lxd.nix | ||
| multipass.nix | ||
| nixos-containers.nix | ||
| oci-common.nix | ||
| oci-config-user.nix | ||
| oci-containers.nix | ||
| oci-image.nix | ||
| oci-options.nix | ||
| openstack-config.nix | ||
| openstack-metadata-fetcher.nix | ||
| openstack-options.nix | ||
| openvswitch.nix | ||
| parallels-guest.nix | ||
| proxmox-image.nix | ||
| proxmox-lxc.nix | ||
| qemu-guest-agent.nix | ||
| qemu-vm.nix | ||
| rosetta.nix | ||
| spice-usb-redirection.nix | ||
| vagrant-guest.nix | ||
| vagrant-virtualbox-image.nix | ||
| virtualbox-guest.nix | ||
| virtualbox-host.nix | ||
| virtualbox-image.nix | ||
| vmware-guest.nix | ||
| vmware-host.nix | ||
| vmware-image.nix | ||
| waydroid.nix | ||
| xe-guest-utilities.nix | ||
| xen-dom0.nix | ||
| xen-domU.nix | ||