Skip to content

Commit 3ea193d

Browse files
Kabuki94claude
andcommitted
feat(configurator): packages + deployment-targets toggle sections
Commit 2 of 3 in the configurator-as-SSOT chain (commit A: fef19cf added the toml schema). Two new sections in /configurator.html, each populated dynamically from a JS spec table that mirrors the toml schema: 1. "Packages · what gets layered into the image" (Phase 7-8) * 35 toggles, one per [packages.<section>] table the operator can flip on/off. 34 default ON, 1 default OFF (bloat). * Categories surface in the label as [core] / [host] / [dev] / [build] / [gpu] / [desktop] / [ai] / [cluster] / [iam] / [interop] / [gaming] / [bloat]. Tooltip on each row carries the one-line description (gpu-nvidia: "akmod-nvidia, CUDA, NVIDIA Container Toolkit", etc.). * Toggling writes [packages.<name>].enable to the saved mios.toml (matches commit A's schema). Skipped (intentionally not toggleable): repos, moby, kernel, critical, gnome-flatpak-runtime, gnome-core-apps, gpu-cdi-toolkits, glibc-hwcaps-v3/v4, dev_overlay (auto-pulled or gated by other settings). 2. "Deployment targets · output image formats" (Phase 9) * 8 toggles, one per bootc-image-builder format. 5 default ON (vhdx / qcow2 / iso / raw / wsl), 3 default OFF (ami / ova / anaconda_iso -- need extra host tooling). * Toggling writes [deployment].target_<key> to the saved mios.toml (matches commit A's schema). Both sections default-open (`<details ... open>`) so the operator sees them on first paint -- the entire "what does my MiOS contain" question is answered without a click. Pre-checked-by-default per the operator instruction: "MiOS Defaults are all pre-checked on, excluding bloat and including everything else (steamos, proton/wine11+, ALL the self; dev, build, host, hosting self, run, deploy all target images / build target images for ALL deployment types) -- EVERYTHING!!!" The default-ON set covers steamos (via [packages.steam] from commit A), proton/wine, all dev/build toolchains, all host/ hosting daemons, all GPU compute stacks, all virt+containers, all Kubernetes/Ceph clustering, all interop (Windows/Android), AI, and all 5 portable deployment image formats. Validated via Python regex check: PACKAGES entries: 35 DEPLOY_TARGETS: 8 (vhdx qcow2 iso raw wsl ami ova anaconda_iso) default ON: 34 packages + 5 deploy targets default OFF: bloat + ami + ova + anaconda_iso Next commit (3 of 3): build pipeline reads MIOS_PKG_<X>_ENABLE + MIOS_DEPLOY_<X>_ENABLE (synthesized by tools/lib/userenv.sh from the layered toml) and respects the toggles -- automation/lib/ packages.sh skips dnf installs for disabled groups, mios-build- driver builds BIB_FORMATS dynamically from enabled targets. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent fef19cf commit 3ea193d

1 file changed

Lines changed: 158 additions & 0 deletions

File tree

usr/share/mios/configurator/index.html

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,44 @@ <h1>MiOS configurator <span class="v" id="v-meta">schema 1.2.0 / mios 0.2.4</spa
359359
</div>
360360
</details>
361361

362+
<details class="section" open>
363+
<summary>Packages · what gets layered into the image <span class="phase-badge">Phase 7-8 · Install → Build</span></summary>
364+
<div class="section-body">
365+
<fieldset style="grid-column: 1 / -1">
366+
<legend>packages.&lt;section&gt;.enable</legend>
367+
<p style="color: var(--muted); font-size: 12px; margin: 0 0 8px;">
368+
Each toggle controls whether
369+
<code>[packages.&lt;name&gt;].pkgs</code> is installed during the
370+
OCI build. <strong>Default = everything ON</strong> (full MiOS:
371+
host, hosting, dev, build, run, deploy, gaming/SteamOS, AI,
372+
Kubernetes, virt, GPU compute) <strong>except bloat</strong>
373+
(gnome-tour, PackageKit, malcontent — opt-in only).
374+
Hover for description.
375+
</p>
376+
<div id="package-grid" style="display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px;"></div>
377+
</fieldset>
378+
</div>
379+
</details>
380+
381+
<details class="section" open>
382+
<summary>Deployment targets · output image formats <span class="phase-badge">Phase 9 · Deploy</span></summary>
383+
<div class="section-body">
384+
<fieldset style="grid-column: 1 / -1">
385+
<legend>deployment.target_&lt;format&gt;</legend>
386+
<p style="color: var(--muted); font-size: 12px; margin: 0 0 8px;">
387+
After the OCI image is built, bootc-image-builder renders one
388+
artifact per enabled format under
389+
<code>/var/lib/mios/build/output/</code>.
390+
<strong>Default = vhdx + qcow2 + iso + raw + wsl ON</strong>
391+
(every portable target). AMI / OVA / Anaconda installer are
392+
OFF by default — they need extra host tools (aws-cli, ovftool,
393+
anaconda).
394+
</p>
395+
<div id="deploy-grid" style="display:grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 4px;"></div>
396+
</fieldset>
397+
</div>
398+
</details>
399+
362400
<details class="section">
363401
<summary>Services · per-Quadlet first-boot enablement <span class="phase-badge">Phase 9-10 · Deploy → Boot</span></summary>
364402
<div class="section-body">
@@ -409,6 +447,75 @@ <h1>MiOS configurator <span class="v" id="v-meta">schema 1.2.0 / mios 0.2.4</spa
409447
"guacamole-postgres", "guacd"
410448
];
411449

450+
// ── Package groups: every [packages.<name>] table the build can layer ─────
451+
// One checkbox per group; default ON for every group EXCEPT bloat (per
452+
// operator instruction 2026-05-06: "MiOS Defaults are all pre-checked
453+
// on, excluding bloat and including everything else"). Toggling a group
454+
// writes [packages.<name>].enable in the saved mios.toml.
455+
const PACKAGES = [
456+
// core
457+
{ name: "base", default: true, group: "core", desc: "kernel + glibc + systemd + bash baseline" },
458+
{ name: "security", default: true, group: "core", desc: "audit, tpm2-tools, clevis, openscap, aide, nftables" },
459+
{ name: "utils", default: true, group: "core", desc: "lsof, jq, ripgrep, vim, tmux, fastfetch, htop" },
460+
{ name: "boot", default: true, group: "core", desc: "shim, grub2, dracut, plymouth (boot chain)" },
461+
// dev / build
462+
{ name: "build-toolchain", default: true, group: "dev", desc: "gcc, make, cmake, go, rust, python-devel" },
463+
{ name: "self-build", default: true, group: "dev", desc: "in-tree build automation deps" },
464+
{ name: "sbom-tools", default: true, group: "build", desc: "syft, grype, cosign, regctl" },
465+
{ name: "uki", default: true, group: "build", desc: "Unified Kernel Image tooling" },
466+
{ name: "k3s-selinux-build", default: true, group: "build", desc: "build-time SELinux policy for k3s" },
467+
{ name: "cockpit-plugins-build", default: true, group: "build", desc: "in-house cockpit plugin packages" },
468+
{ name: "looking-glass-build", default: true, group: "build", desc: "build LookingGlass for VFIO GPU passthrough" },
469+
// host / hosting
470+
{ name: "containers", default: true, group: "host", desc: "podman, buildah, skopeo, podman-compose" },
471+
{ name: "cockpit", default: true, group: "host", desc: "cockpit + cockpit-podman + cockpit-machines" },
472+
{ name: "storage", default: true, group: "host", desc: "btrfs / zfs / luks / lvm tooling" },
473+
{ name: "virt", default: true, group: "host", desc: "qemu-kvm, libvirt, virt-install, spice" },
474+
{ name: "guests", default: true, group: "host", desc: "qemu-guest-agent, hyperv-daemons, spice-vdagent" },
475+
{ name: "network-discovery", default: true, group: "host", desc: "avahi, mdns, llmnr, ssdp" },
476+
{ name: "updater", default: true, group: "host", desc: "rpm-ostree, bootc, fwupd" },
477+
{ name: "nut", default: true, group: "host", desc: "Network UPS Tools (APC/Eaton/CyberPower)" },
478+
// gpu / compute
479+
{ name: "gpu-mesa", default: true, group: "gpu", desc: "Mesa userspace drivers (Intel/AMD/Vulkan)" },
480+
{ name: "gpu-nvidia", default: true, group: "gpu", desc: "akmod-nvidia, CUDA, NVIDIA Container Toolkit" },
481+
{ name: "gpu-amd-compute", default: true, group: "gpu", desc: "ROCm runtime (amdgpu compute)" },
482+
{ name: "gpu-intel-compute", default: true, group: "gpu", desc: "Intel Compute Runtime (oneAPI)" },
483+
// desktop
484+
{ name: "gnome", default: true, group: "desktop", desc: "GNOME Shell + core session" },
485+
{ name: "phosh", default: true, group: "desktop", desc: "Phosh mobile shell (PinePhone form-factor)" },
486+
// ai
487+
{ name: "ai", default: true, group: "ai", desc: "ollama, mios-ai container, embedding tools" },
488+
// k8s / cluster
489+
{ name: "k3s", default: true, group: "cluster", desc: "k3s lightweight Kubernetes" },
490+
{ name: "ceph", default: true, group: "cluster", desc: "Ceph storage cluster client + cephadm" },
491+
{ name: "ha", default: true, group: "cluster", desc: "pacemaker + corosync (HA clustering)" },
492+
// identity / interop
493+
{ name: "freeipa", default: true, group: "iam", desc: "FreeIPA identity domain client" },
494+
{ name: "wintools", default: true, group: "interop", desc: "Windows interop (clipboard, RDP, smbclient)" },
495+
{ name: "android", default: true, group: "interop", desc: "android-tools, scrcpy, waydroid" },
496+
// gaming
497+
{ name: "gaming", default: true, group: "gaming", desc: "gamemode, vulkan-tools (base gaming utilities)" },
498+
{ name: "steam", default: true, group: "gaming", desc: "Steam + Proton + Wine + Lutris + gamescope (SteamOS surface)" },
499+
// bloat -- intentionally OFF
500+
{ name: "bloat", default: false, group: "bloat", desc: "gnome-tour, malcontent, PackageKit (intentionally bloat; opt-in only)" },
501+
];
502+
503+
// ── Deployment target image formats (bootc-image-builder) ─────────────────
504+
// Each toggle controls whether the build pipeline produces that image
505+
// format. Default ON for the 5 portable formats; OFF for cloud-specific
506+
// (AMI/OVA) and Anaconda-installer ISO since those require additional
507+
// host-side tools (aws-cli, ovftool, anaconda) the operator may not have.
508+
const DEPLOY_TARGETS = [
509+
{ key: "vhdx", default: true, desc: "Hyper-V / Azure VM disk" },
510+
{ key: "qcow2", default: true, desc: "QEMU / KVM / libvirt / Proxmox / GNOME Boxes" },
511+
{ key: "iso", default: true, desc: "live + installer ISO" },
512+
{ key: "raw", default: true, desc: "raw disk image (bare-metal write)" },
513+
{ key: "wsl", default: true, desc: "WSL2 rootfs tarball" },
514+
{ key: "ami", default: false, desc: "AWS AMI (requires aws-cli + signing)" },
515+
{ key: "ova", default: false, desc: "vSphere OVA (requires ovftool)" },
516+
{ key: "anaconda_iso", default: false, desc: "Anaconda installer ISO (slower build path)" },
517+
];
518+
412519
// ── Color palette: defaults + named-token / ANSI-slot definitions ─────────────
413520
// Defaults match the canonical [colors] block in mios.toml SSOT
414521
// (Hokusai "Great Wave" + operator neutrals). Configurator color pickers
@@ -674,6 +781,57 @@ <h1>MiOS configurator <span class="v" id="v-meta">schema 1.2.0 / mios 0.2.4</spa
674781
el.value = DATA[sec]?.[key] || "";
675782
}
676783
});
784+
// Package-group checkboxes ([packages.<name>].enable)
785+
const pg = document.getElementById("package-grid");
786+
if (pg) {
787+
pg.innerHTML = "";
788+
for (const p of PACKAGES) {
789+
const tableKey = `packages.${p.name}`;
790+
// Read order: existing toml > spec default. The toml's enable
791+
// shadows the spec for returning operators.
792+
const v = DATA[tableKey]?.enable ?? p.default;
793+
const id = `pk-${p.name.replace(/[^A-Za-z0-9]/g, "-")}`;
794+
const row = document.createElement("div");
795+
row.className = "checkbox-row";
796+
row.title = p.desc;
797+
row.innerHTML =
798+
`<input type="checkbox" id="${id}" ${v ? "checked" : ""}>` +
799+
`<label for="${id}">${p.name}` +
800+
` <span style="color:var(--muted); font-size:11px;">[${p.group}]</span>` +
801+
`</label>`;
802+
pg.appendChild(row);
803+
row.querySelector("input").addEventListener("change", e => {
804+
DATA[tableKey] = DATA[tableKey] || {};
805+
DATA[tableKey].enable = e.target.checked;
806+
renderRaw();
807+
});
808+
}
809+
}
810+
// Deployment-target checkboxes ([deployment].target_<key>)
811+
const dg = document.getElementById("deploy-grid");
812+
if (dg) {
813+
dg.innerHTML = "";
814+
for (const t of DEPLOY_TARGETS) {
815+
const tableKey = "deployment";
816+
const fieldKey = `target_${t.key}`;
817+
const v = DATA[tableKey]?.[fieldKey] ?? t.default;
818+
const id = `dp-${t.key.replace(/[^A-Za-z0-9]/g, "-")}`;
819+
const row = document.createElement("div");
820+
row.className = "checkbox-row";
821+
row.title = t.desc;
822+
row.innerHTML =
823+
`<input type="checkbox" id="${id}" ${v ? "checked" : ""}>` +
824+
`<label for="${id}">${t.key}` +
825+
` <span style="color:var(--muted); font-size:11px;">${t.desc}</span>` +
826+
`</label>`;
827+
dg.appendChild(row);
828+
row.querySelector("input").addEventListener("change", e => {
829+
DATA[tableKey] = DATA[tableKey] || {};
830+
DATA[tableKey][fieldKey] = e.target.checked;
831+
renderRaw();
832+
});
833+
}
834+
}
677835
// Quadlet checkboxes
678836
const qg = document.getElementById("quadlet-grid");
679837
qg.innerHTML = "";

0 commit comments

Comments
 (0)