anchor.diff:          '';
         };
   
  +      # mkRemovedOptionModule does not work in submodules, do it manually
         package = mkOption {
  -        type = types.package;
  -        default = pkgs.OVMF;
  -        defaultText = literalExpression "pkgs.OVMF";
  -        example = literalExpression "pkgs.OVMFFull";
  -        description = ''
  -          OVMF package to use.
  +        type = types.nullOr types.package;
  +        default = null;
  +        internal = true;
  +      };
  +
  +      packages = mkOption {
  +        type = types.listOf types.package;
  +        default = [ pkgs.OVMF.fd ];
  +        defaultText = literalExpression "[ pkgs.OVMF.fd ]";
  +        example = literalExpression "[ pkgs.OVMFFull.fd pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd ]";
  +        description = ''
  +          List of OVMF packages to use. Each listed package must contain files names FV/OVMF_CODE.fd and FV/OVMF_VARS.fd or FV/AAVMF_CODE.fd and FV/AAVMF_VARS.fd
           '';
         };
       };
  
positive.code:           ln -s --force ${cfg.qemu.package}/$helper /run/${dirName}/nix-helpers/
          done
  
          ${optionalString cfg.qemu.ovmf.enable ''
            ln -s --force ${cfg.qemu.ovmf.package.fd}/FV/${ovmfFilePrefix}_CODE.fd /run/${dirName}/nix-ovmf/
            ln -s --force ${cfg.qemu.ovmf.package.fd}/FV/${ovmfFilePrefix}_VARS.fd /run/${dirName}/nix-ovmf/
          ''}
        '';
  
        serviceConfig = {
  
negative.code:     auth_unix_rw = "polkit"
      ${cfg.extraConfig}
    '';
    qemuConfigFile = pkgs.writeText "qemu.conf" ''
      ${optionalString cfg.qemu.ovmf.enable ''
        nvram = [ "/run/libvirt/nix-ovmf/AAVMF_CODE.fd:/run/libvirt/nix-ovmf/AAVMF_VARS.fd", "/run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd" ]
      ''}
      ${optionalString (!cfg.qemu.runAsRoot) ''
        user = "qemu-libvirtd"
  