complete i18n migration to /[locale]/ with EN+ES content

Full rewrite of the docs site under app/[locale]/ with next-intl
in localePrefix:"always" mode. Every page now exists at both
/en/<path> and /es/<path>; the root / shows a meta-refresh + JS
redirect to /<defaultLocale>/ so GitHub Pages serves something
on the apex URL.

Highlights:
- 107 doc pages migrated to file-per-page JSON namespaces under
  messages/en/ and messages/es/. Spanish content is fully
  translated (no copy-of-English placeholders).
- New documentation for the Active Suppressions section in the
  Settings tab and the per-event Dismiss dropdown in the Health
  Monitor modal.
- New screenshots: dismiss-duration-dropdown.png and an updated
  health-suppression-settings.png.
- Pagefind integrated for client-side search; index is built on
  every CI deploy (not committed).
- RSS feeds: per-locale at /<locale>/rss.xml plus root /rss.xml
  for backward compat.
- Removed the dead app/[locale]/guides/[slug]/ route — every
  guide now has its own static page and no markdown source
  remains.
- Fixed orphan link /guides/nvidia -> /guides/nvidia-manual in
  docs/hardware/nvidia-host.
- Removed obsolete components (footer2, calendar, drawer).

Verified locally with `npm ci && npm run build`: 2804 files in
out/, 231 pages indexed by pagefind, root redirect intact, both
locale roots and the new Active Suppressions docs render OK.
This commit is contained in:
MacRimi
2026-05-31 12:41:10 +02:00
parent 875910b4d7
commit 5ca3463bf6
649 changed files with 83958 additions and 11096 deletions

View File

@@ -0,0 +1,196 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import Image from "next/image"
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.automated.meta" })
return {
title: t("title"),
description: t("description"),
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://macrimi.github.io/ProxMenux/docs/post-install/automated",
},
}
}
type OptimizationRow = { tool: string; what: string; category: string; categorySlug: string }
type RelatedItem = { label: string; href: string; tail: string }
export default async function AutomatedPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.automated" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { automated: {
optimizations: OptimizationRow[]
upgrade: { items: string[] }
notDoes: { items: string[] }
related: { items: RelatedItem[] }
} } }
}
const optimizations = messages.docs.postInstall.automated.optimizations
const upgradeItems = messages.docs.postInstall.automated.upgrade.items
const notDoesItems = messages.docs.postInstall.automated.notDoes.items
const relatedItems = messages.docs.postInstall.automated.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const customLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/customizable" className="text-blue-700 hover:underline">{chunks}</Link>
)
const upgradeLink = (chunks: React.ReactNode) => (
<Link href="/docs/utils/system-update" className="text-blue-600 hover:underline">{chunks}</Link>
)
const secLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/security" className="text-blue-600 hover:underline">{chunks}</Link>
)
const virtLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/virtualization" className="text-blue-600 hover:underline">{chunks}</Link>
)
const optLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/optional" className="text-blue-600 hover:underline">{chunks}</Link>
)
const perfLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/performance" className="text-blue-600 hover:underline">{chunks}</Link>
)
const storLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/storage" className="text-blue-600 hover:underline">{chunks}</Link>
)
const overviewLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install" className="text-blue-700 hover:underline">{chunks}</Link>
)
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-600 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={10}
scriptPath="post_install/auto_post_install.sh"
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong, link: customLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("applies.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("applies.intro", {
em: (chunks) => <em>{chunks}</em>,
})}
</p>
<div className="overflow-x-auto rounded-md border border-gray-200 mb-6">
<table className="w-full text-sm">
<thead className="bg-gray-50 text-left text-gray-700">
<tr>
<th className="px-4 py-2 font-semibold">{t("applies.headerNum")}</th>
<th className="px-4 py-2 font-semibold">{t("applies.headerTool")}</th>
<th className="px-4 py-2 font-semibold">{t("applies.headerWhat")}</th>
<th className="px-4 py-2 font-semibold">{t("applies.headerCategory")}</th>
</tr>
</thead>
<tbody className="divide-y divide-gray-200 text-gray-800">
{optimizations.map((o, i) => (
<tr key={i}>
<td className="px-4 py-2 text-gray-500 font-mono">{i + 1}</td>
<td className="px-4 py-2 font-semibold">{o.tool}</td>
<td className="px-4 py-2 text-gray-700 leading-relaxed">{o.what}</td>
<td className="px-4 py-2">
<Link
href={`/docs/post-install/${o.categorySlug}`}
className="text-blue-600 hover:underline whitespace-nowrap"
>
{o.category}
</Link>
</td>
</tr>
))}
</tbody>
</table>
</div>
<Callout variant="tip" title={t("hardwareTitle")}>
{t.rich("hardwareBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("upgrade.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("upgrade.intro")}</p>
<CopyableCode
code={`apt update && apt full-upgrade -y`}
language="bash"
/>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("upgrade.after", { strong, link: upgradeLink })}
</p>
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
{upgradeItems.map((_, idx) => (
<li key={idx}>{t.rich(`upgrade.items.${idx}`, { code })}</li>
))}
</ul>
<Callout variant="info" title={t("upgrade.sameTitle")}>
{t.rich("upgrade.sameBody", { code, link: upgradeLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("endResult.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("endResult.body")}</p>
<Image
src="/post-install/automated-result.png"
alt={t("endResult.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("notDoes.heading")}</h2>
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
{notDoesItems.map((_, idx) => (
<li key={idx}>{t.rich(`notDoes.items.${idx}`, { secLink, virtLink, optLink, perfLink, storLink })}</li>
))}
</ul>
<Callout variant="warning" title={t("xshokTitle")}>
{t.rich("xshokBody", { code, link: overviewLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("revert.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("revert.body", { code, link: uninstallLink })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,250 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import Image from "next/image"
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.basicSettings.meta" })
return { title: t("title"), description: t("description") }
}
type UpgradeRow = { version: string; script: string; codename: string }
type UtilityItem = { pkg: string; desc: string }
type UtilityGroup = { group: string; items: UtilityItem[] }
type RelatedItem = { label: string; href: string; tail: string }
const SCREENSHOTS = [
{ pkg: "htop", alt: "htop interactive process viewer", src: "/basic/htop.png" },
{ pkg: "btop", alt: "btop resource monitor", src: "/basic/btop.png" },
{ pkg: "iftop", alt: "iftop bandwidth per connection", src: "/basic/iftop.png" },
{ pkg: "iotop", alt: "iotop disk I/O per process", src: "/basic/iotop.png" },
{ pkg: "iptraf-ng", alt: "iptraf-ng IP LAN monitor", src: "/basic/iptraf-ng.png" },
{ pkg: "tmux", alt: "tmux terminal multiplexer", src: "/basic/tmux.png" },
]
export default async function PostInstallBasicSettingsPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.basicSettings" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { basicSettings: {
upgrade: { rows: UpgradeRow[]; doesItems: string[] }
utilities: { groups: UtilityGroup[] }
related: { items: RelatedItem[] }
} } }
}
const upgradeRows = messages.docs.postInstall.basicSettings.upgrade.rows
const doesItems = messages.docs.postInstall.basicSettings.upgrade.doesItems
const utilityGroups = messages.docs.postInstall.basicSettings.utilities.groups
const relatedItems = messages.docs.postInstall.basicSettings.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const updateLink = (chunks: React.ReactNode) => (
<Link href="/docs/utils/system-update" className="text-blue-600 hover:underline">{chunks}</Link>
)
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t("intro.body")}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("upgrade.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("upgrade.intro", { em })}
</p>
<div className="my-4 overflow-x-auto">
<table className="min-w-full border border-gray-200 text-sm">
<thead className="bg-gray-100">
<tr>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("upgrade.headerVersion")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("upgrade.headerScript")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("upgrade.headerCodename")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{upgradeRows.map((row) => (
<tr key={row.version}>
<td className="border border-gray-200 px-3 py-2">{row.version}</td>
<td className="border border-gray-200 px-3 py-2"><code>{row.script}</code></td>
<td className="border border-gray-200 px-3 py-2">{row.codename}</td>
</tr>
))}
</tbody>
</table>
</div>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("upgrade.officialTitle")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">{t("upgrade.officialBody")}</p>
<CopyableCode
code={`apt update && apt full-upgrade -y`}
language="bash"
/>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("upgrade.officialOutro", { em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("upgrade.doesTitle")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("upgrade.doesIntro", { link: updateLink })}
</p>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{doesItems.map((_, idx) => (
<li key={idx}>{t.rich(`upgrade.doesItems.${idx}`, { strong, em, code })}</li>
))}
</ul>
<Callout variant="info" title={t("upgrade.shortTitle")}>
{t.rich("upgrade.shortBody", { code, link: updateLink })}
</Callout>
<Callout variant="warning" title={t("upgrade.subTitle")}>
{t("upgrade.subBody")}
</Callout>
<Callout variant="tip" title={t("upgrade.safetyTitle")}>
{t.rich("upgrade.safetyBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("time.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("time.intro", { code })}
</p>
<Callout variant="warning" title={t("time.depTitle")}>
{t.rich("time.depBody", { code })}
</Callout>
<CopyableCode
code={`# Manual alternative — pick your IANA zone
timedatectl list-timezones | grep -i europe # e.g. Europe/Madrid
timedatectl set-timezone Europe/Madrid
timedatectl set-ntp true
timedatectl # verify`}
className="my-4"
/>
<Callout variant="tip" title={t("time.revertTitle")}>
{t.rich("time.revertBody", { link: uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("languages.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("languages.intro", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("languages.writtenTitle")}</h3>
<CopyableCode
code={`# /etc/apt/apt.conf.d/99-disable-translations
Acquire::Languages "none";`}
className="my-4"
/>
<Callout variant="tip" title={t("languages.revertTitle")}>
{t.rich("languages.revertBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("utilities.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("utilities.intro", { strong, code })}
</p>
<Image
src="/basic/menu_utilities.png"
alt={t("utilities.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<Callout variant="tip" title={t("utilities.reuseTitle")}>
{t.rich("utilities.reuseBody", { code, em })}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("utilities.listTitle")}</h3>
{utilityGroups.map((group) => (
<div key={group.group} className="mb-6">
<h4 className="text-base font-semibold text-gray-900 mb-2">{group.group}</h4>
<dl className="divide-y divide-gray-200 border border-gray-200 rounded-md overflow-hidden">
{group.items.map((item) => (
<div key={item.pkg} className="grid grid-cols-1 sm:grid-cols-[150px_1fr] gap-2 px-4 py-3 bg-white">
<dt className="font-mono text-sm text-gray-900">{item.pkg}</dt>
<dd className="text-sm text-gray-700 m-0 leading-relaxed">{item.desc}</dd>
</div>
))}
</dl>
</div>
))}
<h3 className="text-lg font-semibold mt-8 mb-3 text-gray-900">{t("utilities.actionTitle")}</h3>
<div className="grid gap-4 sm:grid-cols-2 my-4">
{SCREENSHOTS.map((s) => (
<figure key={s.pkg} className="m-0">
<Image
src={s.src}
alt={s.alt}
width={450}
height={280}
className="rounded shadow border border-gray-200 w-full h-auto"
/>
<figcaption className="text-xs text-gray-600 mt-1 text-center">
<code>{s.pkg}</code>
</figcaption>
</figure>
))}
</div>
<Callout variant="warning" title={t("utilities.noBulkTitle")}>
{t.rich("utilities.noBulkBody", { strong })}
</Callout>
<CopyableCode
code={`# Remove a utility you no longer want
apt purge htop
apt autoremove --purge`}
className="my-4"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,136 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import { ArrowRight } from "lucide-react"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.customizable.meta" })
return {
title: t("title"),
description: t("description"),
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://macrimi.github.io/ProxMenux/docs/post-install/customizable",
},
}
}
type Category = { name: string; description: string }
type RelatedItem = { label: string; href: string; tail?: string; tailRich?: string }
const CATEGORY_SLUGS = [
"basic-settings",
"system",
"virtualization",
"network",
"storage",
"security",
"customization",
"monitoring",
"performance",
"optional",
]
export default async function CustomizablePage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.customizable" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { customizable: {
categories: Category[]
related: { items: RelatedItem[] }
} } }
}
const categories = messages.docs.postInstall.customizable.categories
const relatedItems = messages.docs.postInstall.customizable.related.items
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
const autoLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/automated" className="text-blue-600 hover:underline">{chunks}</Link>
)
const storageLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/storage" className="text-blue-600 hover:underline">{chunks}</Link>
)
const networkLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/network" className="text-blue-600 hover:underline">{chunks}</Link>
)
const customLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/customization" className="text-blue-600 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={15}
scriptPath="post_install/customizable_post_install.sh"
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { link: uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("compare.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("compare.body", { link: autoLink })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("categoriesSection.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("categoriesSection.body")}</p>
<div className="grid gap-3 md:grid-cols-2 mb-8 not-prose">
{categories.map((category, idx) => (
<Link
key={CATEGORY_SLUGS[idx]}
href={`/docs/post-install/${CATEGORY_SLUGS[idx]}`}
className="group flex items-start gap-2 rounded-md border border-gray-200 bg-white p-3 transition-colors hover:border-blue-400 hover:bg-blue-50"
>
<ArrowRight
className="h-4 w-4 mt-0.5 text-gray-400 group-hover:text-blue-600 flex-shrink-0"
aria-hidden="true"
/>
<div className="min-w-0 flex-1">
<div className="font-medium text-sm text-gray-900 group-hover:text-blue-700">{category.name}</div>
<div className="text-xs text-gray-600 mt-0.5 leading-snug">{category.description}</div>
</div>
</Link>
))}
</div>
<Callout variant="tip" title={t("mixTip.title")}>
{t.rich("mixTip.body", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item, idx) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { storageLink, networkLink, customLink }) : item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,161 @@
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.customization.meta" })
return { title: t("title"), description: t("description") }
}
type RelatedItem = { label: string; href: string; tail: string }
export default async function PostInstallCustomizationPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.customization" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { customization: {
banner: { versionItems: string[] }
related: { items: RelatedItem[] }
} } }
}
const versionItems = messages.docs.postInstall.customization.banner.versionItems
const relatedItems = messages.docs.postInstall.customization.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("bashrc.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("bashrc.intro", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("bashrc.writesTitle")}</h3>
<CopyableCode
code={`# BEGIN PMX_CORE_BASHRC
# ProxMenux core customizations
export HISTTIMEFORMAT="%d/%m/%y %T "
export PS1="\\[\\e[31m\\][\\[\\e[m\\]\\[\\e[38;5;172m\\]\\u\\[\\e[m\\]@\\[\\e[38;5;153m\\]\\h\\[\\e[m\\] \\[\\e[38;5;214m\\]\\W\\[\\e[m\\]\\[\\e[31m\\]]\\[\\e[m\\]\\$ "
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
source /etc/profile.d/bash_completion.sh
# END PMX_CORE_BASHRC`}
className="my-4"
/>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("bashrc.writesOutro", { code })}
</p>
<Callout variant="tip" title={t("bashrc.rootTitle")}>
{t("bashrc.rootBody")}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("motd.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("motd.intro", { em, code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("motd.writesTitle")}</h3>
<CopyableCode
code={` This system is optimised by: ProxMenux
<original /etc/motd content follows here>`}
className="my-4"
/>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("motd.writesOutro", { code })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("banner.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("banner.intro", { em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("banner.versionTitle")}</h3>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{versionItems.map((_, idx) => (
<li key={idx}>{t.rich(`banner.versionItems.${idx}`, { strong, code })}</li>
))}
</ul>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("banner.versionOutro", { code })}
</p>
<Callout variant="warning" title={t("banner.breakTitle")}>
{t.rich("banner.breakBody", { code, link: uninstallLink })}
</Callout>
<Callout variant="danger" title={t("banner.legalTitle")}>
{t.rich("banner.legalBody", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("verify.heading")}</h2>
<p className="mb-3 text-gray-800 leading-relaxed">{t("verify.intro")}</p>
<CopyableCode
code={`# bashrc: the prompt becomes colored, ll / la aliases work
exec bash # reload current shell
ll
# MOTD: log out and SSH back in — the ProxMenux banner shows above the default message
cat /etc/motd
# Subscription banner: log out of the web UI, then log back in — no popup`}
className="my-4"
/>
<Callout variant="tip" title={t("verify.reversibleTitle")}>
{t.rich("verify.reversibleBody", { code, link: uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,134 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import { ExternalLink } from "lucide-react"
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.monitoring.meta" })
return { title: t("title"), description: t("description") }
}
type RelatedItem = { label: string; href: string; tail: string }
export default async function PostInstallMonitoringPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.monitoring" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { monitoring: {
ovh: { decisionsItems: string[] }
related: { items: RelatedItem[] }
} } }
}
const decisionsItems = messages.docs.postInstall.monitoring.ovh.decisionsItems
const relatedItems = messages.docs.postInstall.monitoring.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const ovhAnchor = (chunks: React.ReactNode) => (
<a href="https://www.ovhcloud.com" target="_blank" rel="noopener noreferrer" className="text-blue-600 hover:underline inline-flex items-center gap-1">
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
const rtmAnchor = (chunks: React.ReactNode) => (
<a href="https://www.ovhcloud.com/en/bare-metal/monitoring/" target="_blank" rel="noopener noreferrer" className="text-blue-600 hover:underline inline-flex items-center gap-1">
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("ovh.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("ovh.intro", { a: ovhAnchor })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("ovh.decisionsTitle")}</h3>
<ol className="list-decimal pl-6 space-y-1 text-gray-800 mb-4">
{decisionsItems.map((_, idx) => (
<li key={idx}>{t.rich(`ovh.decisionsItems.${idx}`, { code, em })}</li>
))}
</ol>
<Callout variant="danger" title={t("ovh.remoteTitle")}>
{t.rich("ovh.remoteBody", { code })}
</Callout>
<Callout variant="warning" title={t("ovh.noOpTitle")}>
{t.rich("ovh.noOpBody", { em })}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("ovh.runsTitle")}</h3>
<CopyableCode
code={`# Detect + conditionally install
public_ip=$(curl -s ipinfo.io/ip)
is_ovh=$(whois -h v4.whois.cymru.com " -t $public_ip" | tail -n 1 | cut -d'|' -f3 | grep -i "ovh")
if [ -n "$is_ovh" ]; then
wget -qO - https://last-public-ovh-infra-yak.snap.mirrors.ovh.net/yak/archives/apply.sh \\
| OVH_PUPPET_MANIFEST=distribyak/catalog/master/puppet/manifests/common/rtmv2.pp bash
fi`}
className="my-4"
/>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("ovh.verifyTitle")}</h3>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("ovh.verifyBody", { a: rtmAnchor })}
</p>
<CopyableCode
code={`systemctl status ovh-rtm # or grep the unit name from your install log
journalctl -u ovh-rtm --since "10 min ago"`}
className="my-4"
/>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("ovh.troubleTitle")}</h3>
<Callout variant="tip" title={t("ovh.spuriousTitle")}>
{t.rich("ovh.spuriousBody", { em, code })}
</Callout>
<Callout variant="tip" title={t("ovh.revertTitle")}>
{t.rich("ovh.revertBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,221 @@
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.network.meta" })
return { title: t("title"), description: t("description") }
}
type AreaRow = { area: string; settings: string }
type RelatedItem = { label: string; href: string; tail: string }
export default async function PostInstallNetworkPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.network" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { network: {
sysctl: { rows: AreaRow[] }
names: { whyItems: string[] }
related: { items: RelatedItem[] }
} } }
}
const sysctlRows = messages.docs.postInstall.network.sysctl.rows
const whyItems = messages.docs.postInstall.network.names.whyItems
const relatedItems = messages.docs.postInstall.network.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong, code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("ipv4.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("ipv4.intro", { code })}
</p>
<Callout variant="tip" title={t("ipv4.tipTitle")}>
{t("ipv4.tipBody")}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("sysctl.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("sysctl.intro", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("sysctl.tunedTitle")}</h3>
<div className="my-4 overflow-x-auto">
<table className="min-w-full border border-gray-200 text-sm">
<thead className="bg-gray-100">
<tr>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("sysctl.headerArea")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("sysctl.headerSettings")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{sysctlRows.map((row, idx) => (
<tr key={row.area}>
<td className="border border-gray-200 px-3 py-2">{row.area}</td>
<td className="border border-gray-200 px-3 py-2">{t.rich(`sysctl.rows.${idx}.settings`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("sysctl.sourceOutro", { code })}
</p>
<Callout variant="warning" title={t("sysctl.rpFilterTitle")}>
{t.rich("sysctl.rpFilterBody", { em, code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("ovs.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("ovs.intro", { code, em })}
</p>
<Callout variant="tip" title={t("ovs.tipTitle")}>
{t.rich("ovs.tipBody", { strong, code })}
</Callout>
<Callout variant="warning" title={t("ovs.revertTitle")}>
{t("ovs.revertBody")}
</Callout>
<CopyableCode
code={`# After moving bridges off OVS:
apt purge openvswitch-switch openvswitch-common
apt autoremove --purge`}
className="my-4"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("bbr.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("bbr.intro")}</p>
<CopyableCode
code={`# /etc/sysctl.d/99-kernel-bbr.conf
net.core.default_qdisc = fq
net.ipv4.tcp_congestion_control = bbr
# /etc/sysctl.d/99-tcp-fastopen.conf
net.ipv4.tcp_fastopen = 3 # enable TFO for both client and server sockets`}
className="my-4"
/>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("bbr.verifyTitle")}</h3>
<CopyableCode
code={`# BBR is active
sysctl net.ipv4.tcp_congestion_control
# Expected: net.ipv4.tcp_congestion_control = bbr
# Qdisc is fair queuing (required for BBR to work well)
tc qdisc show | head
# TFO enabled (value 3 = client + server)
sysctl net.ipv4.tcp_fastopen`}
className="my-4"
/>
<Callout variant="tip" title={t("bbr.impactTitle")}>
{t("bbr.impactBody")}
</Callout>
<Callout variant="warning" title={t("bbr.revertTitle")}>
{t("bbr.revertBody")}
</Callout>
<CopyableCode
code={`rm /etc/sysctl.d/99-kernel-bbr.conf /etc/sysctl.d/99-tcp-fastopen.conf
sysctl --system`}
className="my-4"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("names.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("names.intro", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("names.whyTitle")}</h3>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{whyItems.map((_, idx) => (
<li key={idx}>{t.rich(`names.whyItems.${idx}`, { code })}</li>
))}
</ul>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("names.writtenTitle")}</h3>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("names.writtenIntro", { code })}
</p>
<CopyableCode
code={`[Match]
MACAddress=aa:bb:cc:dd:ee:ff
[Link]
Name=enp3s0`}
className="my-4"
/>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("names.writtenOutro", { code })}
</p>
<Callout variant="tip" title={t("names.pveTitle")}>
{t.rich("names.pveBody", { code })}
</Callout>
<Callout variant="warning" title={t("names.reviewTitle")}>
{t.rich("names.reviewBody", { code, em })}
</Callout>
<Callout variant="tip" title={t("names.revertTitle")}>
{t.rich("names.revertBody", { code, link: uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,337 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Plus } from "lucide-react"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.optional.meta" })
return {
title: t("title"),
description: t("description"),
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://macrimi.github.io/ProxMenux/docs/post-install/optional",
images: [
{
url: "https://macrimi.github.io/ProxMenux/optional-settings-image.png",
width: 1200,
height: 630,
alt: t("ogImageAlt"),
},
],
},
twitter: {
card: "summary_large_image",
title: t("ogTitle"),
description: t("ogDescription"),
images: ["https://macrimi.github.io/ProxMenux/optional-settings-image.png"],
},
}
}
type Logo = { name: string; alt: string; src: string }
function StepNumber({ number }: { number: number }) {
return (
<div className="inline-flex items-center justify-center w-8 h-8 mr-3 text-white bg-blue-500 rounded-full">
<span className="text-sm font-bold">{number}</span>
</div>
)
}
export default async function OptionalSettingsPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.optional" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { optional: {
ceph: { doesItems: string[] }
amd: { doesItems: string[] }
ha: { doesItems: string[] }
testing: { doesItems: string[] }
fastfetch: { doesItems: string[]; customItems: string[]; logos: Logo[] }
figurine: { doesItems: string[] }
} } }
}
const cephItems = messages.docs.postInstall.optional.ceph.doesItems
const amdItems = messages.docs.postInstall.optional.amd.doesItems
const haItems = messages.docs.postInstall.optional.ha.doesItems
const testingItems = messages.docs.postInstall.optional.testing.doesItems
const fastfetchItems = messages.docs.postInstall.optional.fastfetch.doesItems
const fastfetchCustomItems = messages.docs.postInstall.optional.fastfetch.customItems
const fastfetchLogos = messages.docs.postInstall.optional.fastfetch.logos
const figurineItems = messages.docs.postInstall.optional.figurine.doesItems
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
return (
<div className="container mx-auto px-4 py-8">
<div className="flex items-center mb-6">
<Plus className="h-8 w-8 mr-2 text-blue-500" />
<h1 className="text-3xl font-bold">{t("title")}</h1>
</div>
<p className="mb-4">
{t.rich("intro", { strong })}
</p>
<h2 className="text-2xl font-semibold mt-8 mb-4">{t("available")}</h2>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={1} />
{t("ceph.title")}
</h3>
<p className="mb-4">{t("ceph.intro")}</p>
<p className="mb-4">{t("ceph.doesIntro")}</p>
<ul className="list-disc pl-5 mb-4">
{cephItems.map((_, idx) => (
<li key={idx}>{t(`ceph.doesItems.${idx}`)}</li>
))}
</ul>
<p className="mb-4">{t("ceph.howUse")}</p>
<p className="text-lg mb-2">{t("ceph.automates")}</p>
<CopyableCode
code={`
# Add Ceph repository
echo "deb https://download.proxmox.com/debian/ceph-squid $(lsb_release -cs) no-subscription" > /etc/apt/sources.list.d/ceph-squid.list
# Update package lists
apt-get update
# Install Ceph
pveceph install
# Verify installation
pveceph status
`}
/>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={2} />
{t("amd.title")}
</h3>
<p className="mb-4">{t("amd.intro")}</p>
<p className="mb-4">{t("amd.doesIntro")}</p>
<ul className="list-disc pl-5 mb-4">
{amdItems.map((_, idx) => (
<li key={idx}>{t(`amd.doesItems.${idx}`)}</li>
))}
</ul>
<p className="mb-4">{t("amd.howUse")}</p>
<p className="text-lg mb-2">{t("amd.automates")}</p>
<CopyableCode
code={`
# Set kernel parameter
sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="/GRUB_CMDLINE_LINUX_DEFAULT="idle=nomwait /g' /etc/default/grub
update-grub
# Configure KVM
echo "options kvm ignore_msrs=Y" >> /etc/modprobe.d/kvm.conf
echo "options kvm report_ignored_msrs=N" >> /etc/modprobe.d/kvm.conf
# Install latest Proxmox VE kernel
apt-get install pve-kernel-$(uname -r | cut -d'-' -f1-2)
`}
/>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={3} />
{t("ha.title")}
</h3>
<p className="mb-4">{t("ha.intro")}</p>
<p className="mb-4">{t("ha.doesIntro")}</p>
<ul className="list-disc pl-5 mb-4">
{haItems.map((_, idx) => (
<li key={idx}>{t(`ha.doesItems.${idx}`)}</li>
))}
</ul>
<p className="mb-4">{t("ha.howUse")}</p>
<p className="text-lg mb-2">{t("ha.automates")}</p>
<CopyableCode
code={`
systemctl enable --now pve-ha-lrm pve-ha-crm corosync
`}
/>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={4} />
{t("testing.title")}
</h3>
<p className="mb-4">{t("testing.intro")}</p>
<p className="mb-4">{t("testing.doesIntro")}</p>
<ul className="list-disc pl-5 mb-4">
{testingItems.map((_, idx) => (
<li key={idx}>{t(`testing.doesItems.${idx}`)}</li>
))}
</ul>
<p className="mb-4">{t("testing.howUse")}</p>
<p className="text-lg mb-2">{t("testing.manualIntro")}</p>
<CopyableCode
code={`
# Add Proxmox testing repository
echo "deb http://download.proxmox.com/debian/pve $(lsb_release -cs) pvetest" | sudo tee /etc/apt/sources.list.d/pve-testing-repo.list
# Update package lists
sudo apt update
`}
/>
<p className="mt-4 text-sm text-gray-600">
<strong>{t("testing.noteLabel")}</strong> {t("testing.noteBody")}
</p>
<p className="mt-4 text-yellow-600">
<strong>{t("testing.warnLabel")}</strong> {t("testing.warnBody")}
</p>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={5} />
{t("fastfetch.title")}
</h3>
<p className="mb-4">{t("fastfetch.intro")}</p>
<p className="mb-4">
<strong>{t("fastfetch.doesLabel")}</strong>
</p>
<ul className="list-disc pl-5 mb-4">
{fastfetchItems.map((_, idx) => (
<li key={idx}>{t.rich(`fastfetch.doesItems.${idx}`, { strong, em })}</li>
))}
</ul>
<div className="bg-yellow-100 border-l-4 border-yellow-500 text-yellow-700 p-4 mb-4">
<p className="font-semibold">{t("fastfetch.importantLabel")}</p>
<p>
{t.rich("fastfetch.importantBody", { strong, code })}
</p>
</div>
<div className="bg-blue-100 border-l-4 border-blue-500 text-blue-700 p-4 mb-4">
<p className="font-semibold">{t("fastfetch.customLabel")}</p>
<p>
{t.rich("fastfetch.customBody1", { code })}
</p>
<p>
{t.rich("fastfetch.customBody2", { code })}
</p>
<p>{t("fastfetch.customBody3")}</p>
<ul className="list-disc pl-5 mt-2">
{fastfetchCustomItems.map((_, idx) => (
<li key={idx}>{t.rich(`fastfetch.customItems.${idx}`, { code })}</li>
))}
</ul>
</div>
<p className="mb-4">
<strong>{t("fastfetch.examplesLabel")}</strong>
</p>
<div className="grid grid-cols-2 md:grid-cols-3 gap-4">
{fastfetchLogos.map((logo) => (
<div key={logo.name}>
<p className="font-semibold text-center">{logo.name}</p>
<img
src={logo.src}
alt={logo.alt}
className="rounded shadow-lg"
/>
</div>
))}
</div>
<p className="text-lg mb-2">{t("fastfetch.automates")}</p>
<CopyableCode
code={`
# Download and install the latest version of Fastfetch
FASTFETCH_URL=$(curl -s https://api.github.com/repos/fastfetch-cli/fastfetch/releases/latest | grep "browser_download_url.*fastfetch-linux-amd64.deb" | cut -d '"' -f 4)
wget -q -O /tmp/fastfetch.deb "$FASTFETCH_URL"
dpkg -i /tmp/fastfetch.deb
apt-get install -f -y
# Configure Fastfetch (logo selection remains interactive)
# The configuration is done through a series of jq commands
# Set Fastfetch to run at login
echo "clear && fastfetch" >> ~/.bashrc
`}
/>
<h3 className="text-xl font-semibold mt-16 mb-4 flex items-center">
<StepNumber number={6} />
{t("figurine.title")}
</h3>
<p className="mb-4">{t("figurine.intro")}</p>
<p className="mb-4">
<strong>{t("figurine.doesLabel")}</strong>
</p>
<ul className="list-disc pl-5 mb-4">
{figurineItems.map((_, idx) => (
<li key={idx}>{t(`figurine.doesItems.${idx}`)}</li>
))}
</ul>
<div className="bg-blue-100 border-l-4 border-blue-500 text-blue-700 p-4 mb-4">
<p className="font-semibold">{t("figurine.practicalLabel")}</p>
<p>{t("figurine.practicalBody")}</p>
</div>
<p className="mb-4">
<strong>{t("figurine.exampleLabel")}</strong>
</p>
<div className="mb-6 flex justify-center">
<img
src="https://macrimi.github.io/ProxMenux/figurine/figurine.png"
alt={t("figurine.imageAlt")}
className="rounded-md shadow-lg border border-gray-200"
style={{ maxWidth: "100%" }}
/>
</div>
<p className="text-lg mb-2">{t("figurine.automates")}</p>
<CopyableCode
code={`
# Check for previous installation and remove if found
if command -v figurine &> /dev/null; then
rm -f "/usr/local/bin/figurine"
fi
# Download and install Figurine
version="2.0.0"
file="figurine_linux_amd64_v\${version}.tar.gz"
url="https://github.com/arsham/figurine/releases/download/v\${version}/\${file}"
wget -qO "/tmp/\${file}" "\${url}"
tar -xf "/tmp/\${file}" -C "/tmp"
mv "/tmp/deploy/figurine" "/usr/local/bin/figurine"
chmod +x "/usr/local/bin/figurine"
# Create welcome message script
cat << 'EOF' > "/etc/profile.d/figurine.sh"
/usr/local/bin/figurine -f "3d.flf" $(hostname)
EOF
chmod +x "/etc/profile.d/figurine.sh"
`}
/>
<p className="mt-4">{t("figurine.outro")}</p>
<section className="mt-12 p-4 bg-blue-100 rounded-md">
<h2 className="text-xl font-semibold mb-2">{t("autoApplication.title")}</h2>
<p>{t("autoApplication.body")}</p>
</section>
</div>
)
}

View File

@@ -0,0 +1,226 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import Image from "next/image"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import { Zap, SlidersHorizontal, Undo2, ExternalLink, RefreshCw } from "lucide-react"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.meta" })
return {
title: t("title"),
description: t("description"),
keywords: [
"proxmox post install",
"proxmox post-install script",
"proxmox optimizations",
"proxmox tweaks",
"proxmox automated setup",
"proxmox customization",
"proxmox no subscription repository",
"proxmox tuning",
"proxmenux post install",
],
alternates: { canonical: "https://proxmenux.com/docs/post-install" },
openGraph: {
title: t("ogTitle"),
description: t("ogDescription"),
type: "article",
url: "https://proxmenux.com/docs/post-install",
},
twitter: {
card: "summary_large_image",
title: t("twitterTitle"),
description: t("twitterDescription"),
},
}
}
type Route = { title: string; description: string; bullets: string[] }
type RelatedItem = { label: string; href: string; tail: string }
const ROUTE_CONFIG = [
{
key: "automated",
href: "/docs/post-install/automated",
Icon: Zap,
accent: "border-emerald-300 bg-emerald-50",
iconBg: "bg-emerald-100 text-emerald-700",
},
{
key: "customizable",
href: "/docs/post-install/customizable",
Icon: SlidersHorizontal,
accent: "border-amber-300 bg-amber-50",
iconBg: "bg-amber-100 text-amber-700",
},
{
key: "updates",
href: "/docs/post-install/updates",
Icon: RefreshCw,
accent: "border-violet-300 bg-violet-50",
iconBg: "bg-violet-100 text-violet-700",
},
{
key: "uninstall",
href: "/docs/post-install/uninstall",
Icon: Undo2,
accent: "border-blue-300 bg-blue-50",
iconBg: "bg-blue-100 text-blue-700",
},
]
export default async function PostInstallPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: {
routes: Route[]
related: { items: RelatedItem[] }
} }
}
const routes = messages.docs.postInstall.routes
const relatedItems = messages.docs.postInstall.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const autoLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/automated" className="text-blue-700 hover:underline">{chunks}</Link>
)
const customLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/customizable" className="text-blue-700 hover:underline">{chunks}</Link>
)
const updatesLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/updates" className="text-blue-700 hover:underline">{chunks}</Link>
)
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
const xshokAnchor = (chunks: React.ReactNode) => (
<a
href="https://github.com/extremeshok/xshok-proxmox"
target="_blank"
rel="noopener noreferrer"
className="text-blue-700 hover:underline inline-flex items-center gap-1"
>
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
const communityAnchor = (chunks: React.ReactNode) => (
<a
href="https://github.com/community-scripts/ProxmoxVE"
target="_blank"
rel="noopener noreferrer"
className="text-blue-600 hover:underline inline-flex items-center gap-1"
>
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
const externalRepoLink = (chunks: React.ReactNode) => (
<Link href="/docs/external-repositories" className="text-blue-600 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={3}
scriptPath="menus/menu_post_install.sh"
/>
<Callout variant="info" title={t("intro.title")}>
{t("intro.body")}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("openingMenu.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("openingMenu.body", { strong })}
</p>
<Image
src="/post-install/post-install-menu.png"
alt={t("openingMenu.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("threeWays.heading")}</h2>
<p className="mb-6 text-gray-800 leading-relaxed">{t("threeWays.body")}</p>
<div className="grid gap-4 md:grid-cols-2 lg:grid-cols-4 mb-8 not-prose">
{ROUTE_CONFIG.map(({ key, href, Icon, accent, iconBg }, idx) => {
const route = routes[idx]
return (
<Link
key={key}
href={href}
className={`rounded-lg border-2 p-5 ${accent} flex flex-col transition-shadow hover:shadow-md`}
>
<div className="flex items-center gap-3 mb-3">
<span className={`inline-flex h-9 w-9 items-center justify-center rounded-full ${iconBg}`}>
<Icon className="h-5 w-5" aria-hidden="true" />
</span>
<h3 className="text-lg font-semibold text-gray-900 m-0">{route.title}</h3>
</div>
<p className="text-sm text-gray-800 mb-3">{route.description}</p>
<ul className="space-y-1 text-sm text-gray-700 list-disc pl-5 mb-0 marker:text-gray-400">
{route.bullets.map((b, i) => (
<li key={i}>{b}</li>
))}
</ul>
</Link>
)
})}
</div>
<Callout variant="tip" title={t("whichTitle")}>
{t.rich("whichBody", { strong, autoLink, customLink, updatesLink, uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("mixing.heading")}</h2>
<Callout variant="warning" title={t("mixing.stackTitle")}>
{t.rich("mixing.stackBody", { strong })}
</Callout>
<Callout variant="info" title={t("mixing.xshokTitle")}>
{t.rich("mixing.xshokBody", { a: xshokAnchor })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("community.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("community.body", { em, code, a: communityAnchor, link: externalRepoLink })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,148 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import { ExternalLink } from "lucide-react"
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.performance.meta" })
return { title: t("title"), description: t("description") }
}
type RelatedItem = { label: string; href: string; tail?: string; tailRich?: string }
export default async function PostInstallPerformancePage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.performance" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { performance: {
pigz: { doesItems: string[] }
related: { items: RelatedItem[] }
} } }
}
const doesItems = messages.docs.postInstall.performance.pigz.doesItems
const relatedItems = messages.docs.postInstall.performance.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const pigzAnchor = (chunks: React.ReactNode) => (
<a href="https://zlib.net/pigz/" target="_blank" rel="noopener noreferrer" className="text-blue-600 hover:underline inline-flex items-center gap-1">
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("pigz.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("pigz.intro", { code, strong, a: pigzAnchor })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("pigz.doesTitle")}</h3>
<p className="mb-3 text-gray-800 leading-relaxed">{t("pigz.doesIntro")}</p>
<ol className="list-decimal pl-6 space-y-2 text-gray-800 mb-4">
{doesItems.map((_, idx) => (
<li key={idx}>{t.rich(`pigz.doesItems.${idx}`, { code, em })}</li>
))}
</ol>
<CopyableCode
code={`# What ProxMenux runs under the hood
sed -i "s/#pigz:.*/pigz: 1/" /etc/vzdump.conf
apt-get -y install pigz
cat > /bin/pigzwrapper <<'EOF'
#!/bin/sh
PATH=/bin:$PATH
GZIP="-1"
exec /usr/bin/pigz "$@"
EOF
chmod +x /bin/pigzwrapper
# Only replaces gzip if not already replaced (idempotent)
[ ! -f /bin/gzip.original ] && mv /bin/gzip /bin/gzip.original \\
&& cp /bin/pigzwrapper /bin/gzip && chmod +x /bin/gzip`}
className="my-4"
/>
<Callout variant="warning" title={t("pigz.replacesTitle")}>
{t.rich("pigz.replacesBody", { code })}
</Callout>
<Callout variant="danger" title={t("pigz.revertTitle")}>
{t.rich("pigz.revertBody", { strong })}
</Callout>
<CopyableCode
code={`# Manual rollback of pigz
mv /bin/gzip.original /bin/gzip # restore original binary
rm /bin/pigzwrapper
sed -i 's/^pigz: 1/#pigz: 1/' /etc/vzdump.conf
# Optional: remove the package
apt purge pigz`}
className="my-4"
/>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("pigz.verifyTitle")}</h3>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("pigz.verifyBody", { code })}
</p>
<CopyableCode
code={`# Confirm gzip now points to pigz
gzip --version
# Expected first line: "pigz 2.x … by Mark Adler"
# Compare throughput (create a 1GB file of random data and compress it)
dd if=/dev/urandom of=/tmp/test.bin bs=1M count=1024 status=none
time gzip -k /tmp/test.bin # uses pigz — parallel
rm /tmp/test.bin.gz
time /bin/gzip.original -k /tmp/test.bin # original single-threaded gzip
rm /tmp/test.bin /tmp/test.bin.gz`}
className="my-4"
/>
<Callout variant="tip" title={t("pigz.whenTitle")}>
{t.rich("pigz.whenBody", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item, idx) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tailRich ? t.rich(`related.items.${idx}.tailRich`, { code }) : item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,110 @@
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.security.meta" })
return { title: t("title"), description: t("description") }
}
type RelatedItem = { label: string; href: string; tail: string }
export default async function PostInstallSecurityPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.security" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { security: {
rpcbind: { whyItems: string[] }
related: { items: RelatedItem[] }
} } }
}
const whyItems = messages.docs.postInstall.security.rpcbind.whyItems
const relatedItems = messages.docs.postInstall.security.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("rpcbind.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rpcbind.intro", { code, strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("rpcbind.whyTitle")}</h3>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{whyItems.map((_, idx) => (
<li key={idx}>{t.rich(`rpcbind.whyItems.${idx}`, { code })}</li>
))}
</ul>
<Callout variant="warning" title={t("rpcbind.nfsTitle")}>
{t.rich("rpcbind.nfsBody", { strong, em, code })}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("rpcbind.runsTitle")}</h3>
<CopyableCode
code={`# Stop and disable the rpcbind service
systemctl stop rpcbind
systemctl disable rpcbind`}
className="my-4"
/>
<p className="mb-4 text-gray-800 leading-relaxed">{t("rpcbind.runsOutro")}</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("rpcbind.verifyTitle")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("rpcbind.verifyBody", { code })}
</p>
<CopyableCode
code={`systemctl is-active rpcbind # should report: inactive
systemctl is-enabled rpcbind # should report: disabled
ss -tulpn | grep ':111 ' # should return nothing`}
className="my-4"
/>
<Callout variant="tip" title={t("rpcbind.reversibleTitle")}>
{t.rich("rpcbind.reversibleBody", { em, link: uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,315 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import { ExternalLink } from "lucide-react"
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.storage.meta" })
return { title: t("title"), description: t("description") }
}
type ArcRow = { ram: string; min: string; max: string }
type SnapRow = { label: string; runs: string; kept: string }
type RelatedItem = { label: string; href: string; tail: string }
export default async function PostInstallStoragePage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.storage" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { storage: {
arc: { rows: ArcRow[] }
autoSnap: { rows: SnapRow[] }
autotrim: {
practicalItems: string[]
whenSkipItems: string[]
}
related: { items: RelatedItem[] }
} } }
}
const arcRows = messages.docs.postInstall.storage.arc.rows
const snapRows = messages.docs.postInstall.storage.autoSnap.rows
const practicalItems = messages.docs.postInstall.storage.autotrim.practicalItems
const whenSkipItems = messages.docs.postInstall.storage.autotrim.whenSkipItems
const relatedItems = messages.docs.postInstall.storage.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const zfsAutoAnchor = (chunks: React.ReactNode) => (
<a href="https://github.com/zfsonlinux/zfs-auto-snapshot" target="_blank" rel="noopener noreferrer" className="text-blue-600 hover:underline inline-flex items-center gap-1">
{chunks}
<ExternalLink className="w-3 h-3" />
</a>
)
return (
<div>
<DocHeader
title={t("header.title")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong })}
</Callout>
<Callout variant="warning" title={t("notTrackedTitle")}>
{t.rich("notTrackedBody", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("arc.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("arc.intro", { strong })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("arc.sizingTitle")}</h3>
<div className="my-4 overflow-x-auto">
<table className="min-w-full border border-gray-200 text-sm">
<thead className="bg-gray-100">
<tr>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("arc.headerRam")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("arc.headerMin")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("arc.headerMax")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{arcRows.map((row) => (
<tr key={row.ram}>
<td className="border border-gray-200 px-3 py-2">{row.ram}</td>
<td className="border border-gray-200 px-3 py-2">{row.min}</td>
<td className="border border-gray-200 px-3 py-2">{row.max}</td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("arc.after", { code })}
</p>
<Callout variant="warning" title={t("arc.rebootTitle")}>
{t.rich("arc.rebootBody", { code, strong })}
</Callout>
<Callout variant="tip" title={t("arc.safeTitle")}>
{t.rich("arc.safeBody", { code })}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("arc.verifyTitle")}</h3>
<CopyableCode
code={`# Check the config file is in place
cat /etc/modprobe.d/99-zfsarc.conf
# After reboot, check actual ARC limits (in bytes)
cat /sys/module/zfs/parameters/zfs_arc_min
cat /sys/module/zfs/parameters/zfs_arc_max
# Manual rollback
rm /etc/modprobe.d/99-zfsarc.conf
update-initramfs -u -k all
# (reboot for ZFS to load with defaults again)`}
className="my-4"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("autoSnap.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("autoSnap.intro", { a: zfsAutoAnchor })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("autoSnap.cadenceTitle")}</h3>
<div className="my-4 overflow-x-auto">
<table className="min-w-full border border-gray-200 text-sm">
<thead className="bg-gray-100">
<tr>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("autoSnap.headerLabel")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("autoSnap.headerRuns")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("autoSnap.headerKept")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{snapRows.map((row) => (
<tr key={row.label}>
<td className="border border-gray-200 px-3 py-2">{row.label}</td>
<td className="border border-gray-200 px-3 py-2">{row.runs}</td>
<td className="border border-gray-200 px-3 py-2">{row.kept}</td>
</tr>
))}
</tbody>
</table>
</div>
<Callout variant="tip" title={t("autoSnap.conservativeTitle")}>
{t.rich("autoSnap.conservativeBody", { code })}
</Callout>
<Callout variant="warning" title={t("autoSnap.onlyZfsTitle")}>
{t("autoSnap.onlyZfsBody")}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("autoSnap.verifyTitle")}</h3>
<CopyableCode
code={`# List existing auto-snapshots across all ZFS datasets
zfs list -t snapshot | grep zfs-auto-snap
# Check the schedules
grep . /etc/cron.d/zfs-auto-snapshot /etc/cron.hourly/zfs-auto-snapshot \\
/etc/cron.daily/zfs-auto-snapshot /etc/cron.weekly/zfs-auto-snapshot \\
/etc/cron.monthly/zfs-auto-snapshot
# Manual rollback (removes the package + destroys no snapshots)
apt purge zfs-auto-snapshot
# Existing snapshots remain on your pools unless you destroy them explicitly`}
className="my-4"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("autotrim.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("autotrim.intro", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("autotrim.trimTitle")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("autotrim.trimBody1", { strong })}
</p>
<p className="mb-4 text-gray-800 leading-relaxed">
{t("autotrim.trimBody2")}
</p>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("autotrim.trimBody3", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("autotrim.practicalTitle")}</h3>
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
{practicalItems.map((_, idx) => (
<li key={idx}>{t.rich(`autotrim.practicalItems.${idx}`, { strong, code })}</li>
))}
</ul>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("autotrim.whenTitle")}</h3>
<ul className="list-disc pl-6 mb-4 text-gray-800 leading-relaxed space-y-1">
<li>
{t.rich("autotrim.whenIntro1", { strong })}
</li>
<li>
{t.rich("autotrim.whenIntro2", { strong })}
<ul className="list-disc pl-6 mt-1">
{whenSkipItems.map((_, idx) => (
<li key={idx}>{t.rich(`autotrim.whenSkipItems.${idx}`, { code })}</li>
))}
</ul>
</li>
<li>
{t.rich("autotrim.whenIntro3", { strong })}
</li>
</ul>
<Callout variant="info" title={t("autotrim.recordedTitle")}>
{t.rich("autotrim.recordedBody", { code })}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("autotrim.manualTitle")}</h3>
<p className="mb-4 text-gray-800 leading-relaxed">{t("autotrim.manualIntro")}</p>
<CopyableCode
code={`# 1. List your ZFS pools
zpool list -H -o name
# 2. Check the current autotrim setting on a pool
zpool get autotrim <pool>
# 3. Verify the pool is backed by SSD/NVMe with TRIM support
# For each vdev (use the device path you see in 'zpool status -P <pool>'):
DEV=sda # replace with the actual short name (sda, nvme0n1, ...)
cat /sys/block/\${DEV}/queue/rotational # must be 0 (SSD/NVMe, not HDD)
cat /sys/block/\${DEV}/queue/discard_granularity # must be > 0 (TRIM supported)
# 4. Turn it on
zpool set autotrim=on <pool>
# 5. Confirm
zpool get autotrim <pool>`}
className="my-4"
/>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("autotrim.verifyTitle")}</h3>
<CopyableCode
code={`# Verify autotrim is active on every pool ProxMenux touched
cat /usr/local/share/proxmenux/zfs_autotrim_pools
while read -r p; do
zpool get autotrim "$p"
done < /usr/local/share/proxmenux/zfs_autotrim_pools
# Manual rollback — disable autotrim on a specific pool
zpool set autotrim=off <pool>
# Or revert all pools ProxMenux changed (manual equivalent of the Uninstall option)
while read -r p; do
zpool set autotrim=off "$p"
done < /usr/local/share/proxmenux/zfs_autotrim_pools`}
className="my-4"
/>
<Callout variant="tip" title={t("autotrim.oneShotTitle")}>
{t.rich("autotrim.oneShotBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("vzdump.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("vzdump.intro")}</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("vzdump.changedTitle")}</h3>
<CopyableCode
code={`bwlimit: 0 # No bandwidth limit (was capped by default)
ionice: 5 # Lower I/O priority (5 = best-effort class, lowest priority in that class)`}
className="my-4"
/>
<Callout variant="warning" title={t("vzdump.noBackupTitle")}>
{t.rich("vzdump.noBackupBody", { strong, code, em })}
</Callout>
<Callout variant="tip" title={t("vzdump.skipTitle")}>
{t.rich("vzdump.skipBody", { code })}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("vzdump.verifyTitle")}</h3>
<CopyableCode
code={`# Check current vzdump config
grep -E "^(bwlimit|ionice):" /etc/vzdump.conf
# Manual rollback (comment out the two lines — restores Proxmox defaults)
sed -i 's/^bwlimit: 0/#bwlimit: KBPS/' /etc/vzdump.conf
sed -i 's/^ionice: 5/#ionice: PRI/' /etc/vzdump.conf`}
className="my-4"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,238 @@
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<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.system.meta" })
return { title: t("title"), description: t("description") }
}
type LimitRow = { file: string; sets: string }
type RelatedItem = { label: string; href: string; tail: string }
export default async function PostInstallSystemPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.system" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { system: {
journald: { keyItems: string[] }
limits: { rows: LimitRow[] }
kexec: { installsItems: string[] }
related: { items: RelatedItem[] }
} } }
}
const keyItems = messages.docs.postInstall.system.journald.keyItems
const limitRows = messages.docs.postInstall.system.limits.rows
const installsItems = messages.docs.postInstall.system.kexec.installsItems
const relatedItems = messages.docs.postInstall.system.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const kexecLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/system" className="text-blue-700 hover:underline">{chunks}</Link>
)
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("journald.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("journald.intro", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("journald.keyTitle")}</h3>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{keyItems.map((_, idx) => (
<li key={idx}>{t.rich(`journald.keyItems.${idx}`, { code })}</li>
))}
</ul>
<Callout variant="tip" title={t("journald.tipTitle")}>
{t.rich("journald.tipBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("logrotate.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("logrotate.intro", { code })}
</p>
<CopyableCode
code={`# /etc/logrotate.conf — ProxMenux-optimized
daily
su root adm
rotate 7
create
compress
size 10M
delaycompress
copytruncate
include /etc/logrotate.d`}
className="my-4"
/>
<Callout variant="tip" title={t("logrotate.tipTitle")}>
{t.rich("logrotate.tipBody", { code, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("limits.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("limits.intro")}</p>
<div className="my-4 overflow-x-auto">
<table className="min-w-full border border-gray-200 text-sm">
<thead className="bg-gray-100">
<tr>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("limits.headerFile")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("limits.headerSets")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{limitRows.map((row, idx) => (
<tr key={row.file}>
<td className="border border-gray-200 px-3 py-2"><code>{row.file}</code></td>
<td className="border border-gray-200 px-3 py-2">{t.rich(`limits.rows.${idx}.sets`, { code })}</td>
</tr>
))}
</tbody>
</table>
</div>
<Callout variant="tip" title={t("limits.tipTitle")}>
{t.rich("limits.tipBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("memory.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("memory.intro", { code })}
</p>
<CopyableCode
code={`# /etc/sysctl.d/99-memory.conf
vm.swappiness = 10 # Avoid swapping unless truly necessary
vm.dirty_ratio = 15 # Start writeback sooner (default 20)
vm.dirty_background_ratio = 5 # Start async writeback earlier (default 10)
vm.overcommit_memory = 1 # Allow overcommit (needed by many applications)
vm.max_map_count = 262144 # Enough for modern apps (ES, Docker, some games)
vm.compaction_proactiveness = 20 # Only on kernels that support it`}
className="my-4"
/>
<Callout variant="warning" title={t("memory.warnTitle")}>
{t.rich("memory.warnBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("kexec.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("kexec.intro", { code, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("kexec.installsTitle")}</h3>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{installsItems.map((_, idx) => (
<li key={idx}>{t.rich(`kexec.installsItems.${idx}`, { code })}</li>
))}
</ul>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("kexec.usageIntro", { code })}
</p>
<CopyableCode
code={`reboot-quick # kexec into the already-loaded kernel
# Equivalent:
systemctl kexec`}
className="my-4"
/>
<Callout variant="warning" title={t("kexec.warnTitle")}>
{t.rich("kexec.warnBody", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("panic.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("panic.intro", { strong })}
</p>
<CopyableCode
code={`# /etc/sysctl.d/99-kernelpanic.conf
kernel.core_pattern = /var/crash/core.%t.%p # where to drop core dumps
kernel.panic = 10 # reboot 10s after a panic
kernel.panic_on_oops = 1 # oops → treated as panic
kernel.hardlockup_panic = 1 # hard lockup → panic → reboot`}
className="my-4"
/>
<Callout variant="tip" title={t("panic.tipTitle")}>
{t.rich("panic.tipBody", { em, link: kexecLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("verify.heading")}</h2>
<p className="mb-3 text-gray-800 leading-relaxed">{t("verify.intro")}</p>
<CopyableCode
code={`# journald: actual size in use and limit
journalctl --disk-usage
# logrotate: check config is active (no errors)
logrotate -d /etc/logrotate.conf 2>&1 | head -20
# System limits: check a few effective values
sysctl fs.inotify.max_user_watches fs.file-max vm.swappiness vm.dirty_ratio
ulimit -n # inside a new root shell
# kexec: service enabled
systemctl is-enabled kexec-pve
# kernel panic config
sysctl kernel.panic kernel.panic_on_oops kernel.hardlockup_panic`}
className="my-4"
/>
<Callout variant="tip" title={t("verify.tipTitle")}>
{t.rich("verify.tipBody", { code, link: uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,161 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import Image from "next/image"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import { Steps } from "@/components/ui/steps"
import CopyableCode from "@/components/CopyableCode"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.uninstall.meta" })
return { title: t("title"), description: t("description") }
}
type Step = {
title: string
body1: string
body2?: string
items?: string[]
}
type ReversibleItem = { tool: string; restores: string }
type ReversibleGroup = { title: string; items: ReversibleItem[] }
type RelatedItem = { label: string; href: string; tail: string }
export default async function UninstallOptimizationsPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.uninstall" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { uninstall: {
howWorks: { steps: Step[] }
reversible: { groups: ReversibleGroup[] }
related: { items: RelatedItem[] }
} } }
}
const steps = messages.docs.postInstall.uninstall.howWorks.steps
const groups = messages.docs.postInstall.uninstall.reversible.groups
const relatedItems = messages.docs.postInstall.uninstall.related.items
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const postInstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install" className="text-blue-700 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong, code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("openMenu.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("openMenu.body", { strong, em })}
</p>
<Image
src="/post-install/post-install-uninstall.png"
alt={t("openMenu.imageAlt")}
width={900}
height={500}
className="rounded shadow-lg my-6"
/>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("howWorks.heading")}</h2>
<Steps>
{steps.map((step, idx) => (
<Steps.Step key={idx} title={step.title}>
<p className="mb-3 text-gray-800">
{t.rich(`howWorks.steps.${idx}.body1`, { code, em, strong })}
</p>
{step.items && (
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-3">
{step.items.map((_, iIdx) => (
<li key={iIdx}>{t.rich(`howWorks.steps.${idx}.items.${iIdx}`, { strong, code })}</li>
))}
</ul>
)}
{step.body2 && (
<p className="text-gray-800">
{t.rich(`howWorks.steps.${idx}.body2`, { code })}
</p>
)}
</Steps.Step>
))}
</Steps>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("reversible.heading")}</h2>
<p className="mb-6 text-gray-800 leading-relaxed">{t("reversible.intro")}</p>
{groups.map((group) => (
<div key={group.title} className="mb-6">
<h3 className="text-lg font-semibold text-gray-900 mb-2">{group.title}</h3>
<dl className="divide-y divide-gray-200 border border-gray-200 rounded-md overflow-hidden">
{group.items.map((item) => (
<div key={item.tool} className="grid grid-cols-1 sm:grid-cols-3 gap-2 px-4 py-3 bg-white">
<dt className="font-medium text-gray-900 text-sm">{item.tool}</dt>
<dd className="sm:col-span-2 text-sm text-gray-700 leading-relaxed m-0">{item.restores}</dd>
</div>
))}
</dl>
</div>
))}
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("edge.heading")}</h2>
<Callout variant="warning" title={t("edge.packageTitle")}>
{t.rich("edge.packageBody", { strong, code })}
</Callout>
<Callout variant="warning" title={t("edge.rebootTitle")}>
{t.rich("edge.rebootBody", { code, em })}
</Callout>
<Callout variant="tip" title={t("edge.perItemTitle")}>
{t.rich("edge.perItemBody", { em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("inspect.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">{t("inspect.intro")}</p>
<CopyableCode code={`cat /usr/local/share/proxmenux/installed_tools.json | jq`} className="my-4" />
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("inspect.outro", { code })}
</p>
<Callout variant="info" title={t("inspect.reinstallTitle")}>
{t.rich("inspect.reinstallBody", { link: postInstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}

View File

@@ -0,0 +1,190 @@
import type { Metadata } from "next"
import { getTranslations, getMessages, setRequestLocale } from "next-intl/server"
import { Link } from "@/i18n/navigation"
import Image from "next/image"
import { DocHeader } from "@/components/ui/doc-header"
import { Callout } from "@/components/ui/callout"
import { Steps } from "@/components/ui/steps"
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: string }>
}): Promise<Metadata> {
const { locale } = await params
const t = await getTranslations({ locale, namespace: "docs.postInstall.updates.meta" })
return {
title: t("title"),
description: t("description"),
alternates: { canonical: "https://proxmenux.com/docs/post-install/updates" },
}
}
type Step = { title: string; body: string }
type DiffRow = { pathLabel: string; pathHref: string | null; scope: string; when: string }
export default async function PostInstallUpdatesPage({
params,
}: {
params: Promise<{ locale: string }>
}) {
const { locale } = await params
setRequestLocale(locale)
const t = await getTranslations({ locale, namespace: "docs.postInstall.updates" })
const messages = (await getMessages({ locale })) as unknown as {
docs: { postInstall: { updates: {
detection: { steps: Step[] }
applying: { steps: Step[] }
differs: { rows: DiffRow[] }
} } }
}
const detectionSteps = messages.docs.postInstall.updates.detection.steps
const applyingSteps = messages.docs.postInstall.updates.applying.steps
const diffRows = messages.docs.postInstall.updates.differs.rows
const code = (chunks: React.ReactNode) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const optimizationsLink = (chunks: React.ReactNode) => (
<Link href="/docs/monitor/dashboard/settings#proxmenux-optimizations" className="text-blue-600 hover:underline">{chunks}</Link>
)
const settingsLink = (chunks: React.ReactNode) => (
<Link href="/docs/monitor/dashboard/settings" className="text-blue-600 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
description={t("header.description")}
section={t("header.section")}
estimatedMinutes={4}
scriptPath="scripts/post_install/update_post_install_function.sh"
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { code })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("why.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("why.body", { em })}
</p>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("detection.heading")}</h2>
<Steps>
{detectionSteps.map((step, idx) => (
<Steps.Step key={idx} title={step.title}>
<p className="mb-2 text-gray-800">
{t.rich(`detection.steps.${idx}.body`, { code, em })}
</p>
</Steps.Step>
))}
</Steps>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("pathA.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("pathA.intro", { strong, em })}
</p>
<figure className="my-4">
<Image
src="/post-install/post-install-updates-menu.png"
alt={t("pathA.menuAlt")}
width={1200}
height={680}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto"
/>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t.rich("pathA.menuCaption", { em })}
</figcaption>
</figure>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("pathA.checklistBody", { code })}
</p>
<figure className="my-4">
<Image
src="/post-install/post-install-updates-checklist.png"
alt={t("pathA.checklistAlt")}
width={1200}
height={680}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto"
/>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("pathA.checklistCaption")}
</figcaption>
</figure>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("pathB.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("pathB.intro", { strong, link: optimizationsLink })}
</p>
<figure className="my-4">
<Image
src="/monitor/settings/proxmenux-optimizations-update-banner.png"
alt={t("pathB.imageAlt")}
width={2000}
height={1146}
className="rounded-lg border border-gray-200 shadow-sm w-full h-auto"
/>
<figcaption className="text-sm text-gray-500 mt-2 text-center italic">
{t("pathB.imageCaption")}
</figcaption>
</figure>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("applying.heading")}</h2>
<Steps>
{applyingSteps.map((step, idx) => (
<Steps.Step key={idx} title={step.title}>
<p className="mb-2 text-gray-800">
{t.rich(`applying.steps.${idx}.body`, { code, strong })}
</p>
</Steps.Step>
))}
</Steps>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("differs.heading")}</h2>
<div className="overflow-x-auto mb-6">
<table className="w-full text-sm border border-gray-200 rounded-md">
<thead className="bg-gray-50 text-gray-900">
<tr>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("differs.headerPath")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("differs.headerScope")}</th>
<th className="text-left px-3 py-2 border-b border-gray-200">{t("differs.headerWhen")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{diffRows.map((row, idx) => (
<tr key={row.pathLabel} className={idx < diffRows.length - 1 ? "border-b border-gray-100" : ""}>
<td className="px-3 py-2 align-top">
{row.pathHref ? (
<Link href={row.pathHref} className="text-blue-600 hover:underline">
{row.pathLabel}
</Link>
) : (
<strong>{row.pathLabel}</strong>
)}
</td>
<td className="px-3 py-2 align-top">{t.rich(`differs.rows.${idx}.scope`, { em })}</td>
<td className="px-3 py-2 align-top">{row.when}</td>
</tr>
))}
</tbody>
</table>
</div>
<Callout variant="info" title={t("notifTitle")}>
{t.rich("notifBody", { em, link: settingsLink })}
</Callout>
</div>
)
}

View File

@@ -0,0 +1,221 @@
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<Metadata> {
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) => <code>{chunks}</code>
const strong = (chunks: React.ReactNode) => <strong>{chunks}</strong>
const em = (chunks: React.ReactNode) => <em>{chunks}</em>
const nvidiaHostLink = (chunks: React.ReactNode) => (
<Link href="/docs/hardware/nvidia-host" className="text-blue-700 hover:underline">{chunks}</Link>
)
const uninstallLink = (chunks: React.ReactNode) => (
<Link href="/docs/post-install/uninstall" className="text-blue-700 hover:underline">{chunks}</Link>
)
return (
<div>
<DocHeader
title={t("header.title")}
section={t("header.section")}
/>
<Callout variant="info" title={t("intro.title")}>
{t.rich("intro.body", { strong })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("guestAgent.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("guestAgent.intro", { code })}
</p>
<div className="my-4 overflow-x-auto">
<table className="min-w-full border border-gray-200 text-sm">
<thead className="bg-gray-100">
<tr>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("guestAgent.headerDetected")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("guestAgent.headerPackage")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{guestRows.map((row) => (
<tr key={row.detected}>
<td className="border border-gray-200 px-3 py-2">{row.detected}</td>
<td className="border border-gray-200 px-3 py-2"><code>{row.package}</code></td>
</tr>
))}
</tbody>
</table>
</div>
<Callout variant="tip" title={t("guestAgent.skipTitle")}>
{t.rich("guestAgent.skipBody", { code, em })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("vfio.heading")}</h2>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("vfio.intro", { code })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("vfio.whoTitle")}</h3>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{whoItems.map((_, idx) => (
<li key={idx}>{t.rich(`vfio.whoItems.${idx}`, { em })}</li>
))}
</ul>
<p className="mb-4 text-gray-800 leading-relaxed">
{t.rich("vfio.whoOutro", { strong, em })}
</p>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("vfio.doesTitle")}</h3>
<p className="mb-3 text-gray-800 leading-relaxed">{t("vfio.doesIntro")}</p>
<div className="my-4 overflow-x-auto">
<table className="min-w-full border border-gray-200 text-sm">
<thead className="bg-gray-100">
<tr>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("vfio.headerBoot")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("vfio.headerFile")}</th>
<th className="border border-gray-200 px-3 py-2 text-left text-gray-900">{t("vfio.headerPost")}</th>
</tr>
</thead>
<tbody className="text-gray-800">
{bootRows.map((row) => (
<tr key={row.boot}>
<td className="border border-gray-200 px-3 py-2">{row.boot}</td>
<td className="border border-gray-200 px-3 py-2"><code>{row.file}</code></td>
<td className="border border-gray-200 px-3 py-2"><code>{row.post}</code></td>
</tr>
))}
</tbody>
</table>
</div>
<p className="mb-3 text-gray-800 leading-relaxed">{t("vfio.kernelIntro")}</p>
<CopyableCode
code={`# Intel CPU → intel_iommu=on
# AMD CPU → amd_iommu=on
# Plus these in both cases:
iommu=pt
pcie_acs_override=downstream,multifunction`}
className="my-4"
/>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("vfio.modulesIntro", { code })}
</p>
<CopyableCode
code={`vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd # only on kernels < 6.2 (merged into vfio in 6.2+)`}
className="my-4"
/>
<p className="mb-3 text-gray-800 leading-relaxed">
{t.rich("vfio.blacklistIntro", { code })}
</p>
<CopyableCode
code={`nouveau
lbm-nouveau
radeon
nvidia
nvidiafb
options nouveau modeset=0`}
className="my-4"
/>
<Callout variant="warning" title={t("vfio.blacklistTitle")}>
{t.rich("vfio.blacklistBody", { em, strong, link: nvidiaHostLink })}
</Callout>
<ul className="list-disc pl-6 space-y-1 text-gray-800 mb-4">
{pathItems.map((_, idx) => (
<li key={idx}>{t.rich(`vfio.pathItems.${idx}`, { strong, code })}</li>
))}
</ul>
<Callout variant="warning" title={t("vfio.rebootTitle")}>
{t.rich("vfio.rebootBody", { code })}
</Callout>
<h3 className="text-lg font-semibold mt-6 mb-2 text-gray-900">{t("vfio.verifyTitle")}</h3>
<CopyableCode
code={`# IOMMU is actually on
dmesg | grep -E "DMAR|IOMMU" | head
# Expect lines like "IOMMU enabled" / "DMAR: IOMMU enabled"
# VFIO modules loaded
lsmod | grep vfio
# See your IOMMU groups — each "Group N" can be passed independently
for d in /sys/kernel/iommu_groups/*/devices/*; do
n=${"${d#*/iommu_groups/*}"}; n=${"${n%%/*}"}
printf 'Group %s ' "$n"; lspci -nns "${"${d##*/}"}"
done | sort -V`}
className="my-4"
/>
<Callout variant="tip" title={t("vfio.revertTitle")}>
{t.rich("vfio.revertBody", { code, link: uninstallLink })}
</Callout>
<h2 className="text-2xl font-semibold mt-10 mb-4 text-gray-900">{t("related.heading")}</h2>
<ul className="list-disc pl-6 text-gray-800 leading-relaxed space-y-1">
{relatedItems.map((item) => (
<li key={item.href}>
<Link href={item.href} className="text-blue-600 hover:underline">
{item.label}
</Link>
{item.tail}
</li>
))}
</ul>
</div>
)
}