mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/incus: fix OVMF path for existing VMs
This commit is contained in:
parent
2d864d1843
commit
cf4a88db79
@ -60,8 +60,26 @@ let
|
||||
}'';
|
||||
|
||||
# https://github.com/lxc/incus/blob/cff35a29ee3d7a2af1f937cbb6cf23776941854b/internal/server/instance/drivers/driver_qemu.go#L123
|
||||
OVMF2MB = pkgs.OVMF.override {
|
||||
secureBoot = true;
|
||||
fdSize2MB = true;
|
||||
};
|
||||
ovmf-prefix = if pkgs.stdenv.hostPlatform.isAarch64 then "AAVMF" else "OVMF";
|
||||
ovmf = pkgs.linkFarm "incus-ovmf" [
|
||||
# 2MB must remain the default or existing VMs will fail to boot. New VMs will prefer 4MB
|
||||
{
|
||||
name = "OVMF_CODE.fd";
|
||||
path = "${OVMF2MB.fd}/FV/${ovmf-prefix}_CODE.fd";
|
||||
}
|
||||
{
|
||||
name = "OVMF_VARS.fd";
|
||||
path = "${OVMF2MB.fd}/FV/${ovmf-prefix}_VARS.fd";
|
||||
}
|
||||
{
|
||||
name = "OVMF_VARS.ms.fd";
|
||||
path = "${OVMF2MB.fd}/FV/${ovmf-prefix}_VARS.fd";
|
||||
}
|
||||
|
||||
{
|
||||
name = "OVMF_CODE.4MB.fd";
|
||||
path = "${pkgs.OVMFFull.fd}/FV/${ovmf-prefix}_CODE.fd";
|
||||
|
Loading…
Reference in New Issue
Block a user