import type { Metadata } from "next" import { getTranslations, getMessages, setRequestLocale } from "next-intl/server" import { Link } from "@/i18n/navigation" import { DocHeader } from "@/components/ui/doc-header" import { Callout } from "@/components/ui/callout" import CopyableCode from "@/components/CopyableCode" export async function generateMetadata({ params, }: { params: Promise<{ locale: string }> }): Promise { const { locale } = await params const t = await getTranslations({ locale, namespace: "docs.postInstall.virtualization.meta" }) return { title: t("title"), description: t("description") } } type GuestRow = { detected: string; package: string } type BootRow = { boot: string; file: string; post: string } type RelatedItem = { label: string; href: string; tail: string } export default async function PostInstallVirtualizationPage({ params, }: { params: Promise<{ locale: string }> }) { const { locale } = await params setRequestLocale(locale) const t = await getTranslations({ locale, namespace: "docs.postInstall.virtualization" }) const messages = (await getMessages({ locale })) as unknown as { docs: { postInstall: { virtualization: { guestAgent: { rows: GuestRow[] } vfio: { whoItems: string[] bootRows: BootRow[] pathItems: string[] } related: { items: RelatedItem[] } } } } } const v = messages.docs.postInstall.virtualization const guestRows = v.guestAgent.rows const whoItems = v.vfio.whoItems const bootRows = v.vfio.bootRows const pathItems = v.vfio.pathItems const relatedItems = v.related.items const code = (chunks: React.ReactNode) => {chunks} const strong = (chunks: React.ReactNode) => {chunks} const em = (chunks: React.ReactNode) => {chunks} const nvidiaHostLink = (chunks: React.ReactNode) => ( {chunks} ) const uninstallLink = (chunks: React.ReactNode) => ( {chunks} ) return (
{t.rich("intro.body", { strong })}

{t("guestAgent.heading")}

{t.rich("guestAgent.intro", { code })}

{guestRows.map((row) => ( ))}
{t("guestAgent.headerDetected")} {t("guestAgent.headerPackage")}
{row.detected} {row.package}
{t.rich("guestAgent.skipBody", { code, em })}

{t("vfio.heading")}

{t.rich("vfio.intro", { code })}

{t("vfio.whoTitle")}

    {whoItems.map((_, idx) => (
  • {t.rich(`vfio.whoItems.${idx}`, { em })}
  • ))}

{t.rich("vfio.whoOutro", { strong, em })}

{t("vfio.doesTitle")}

{t("vfio.doesIntro")}

{bootRows.map((row) => ( ))}
{t("vfio.headerBoot")} {t("vfio.headerFile")} {t("vfio.headerPost")}
{row.boot} {row.file} {row.post}

{t("vfio.kernelIntro")}

{t.rich("vfio.modulesIntro", { code })}

{t.rich("vfio.blacklistIntro", { code })}

{t.rich("vfio.blacklistBody", { em, strong, link: nvidiaHostLink })}
    {pathItems.map((_, idx) => (
  • {t.rich(`vfio.pathItems.${idx}`, { strong, code })}
  • ))}
{t.rich("vfio.rebootBody", { code })}

{t("vfio.verifyTitle")}

{t.rich("vfio.revertBody", { code, link: uninstallLink })}

{t("related.heading")}

    {relatedItems.map((item) => (
  • {item.label} {item.tail}
  • ))}
) }