From d343201724d3a737e397df250f8e970b6bea4ad9 Mon Sep 17 00:00:00 2001 From: Gerald Pinder Date: Thu, 30 Jan 2025 14:00:08 -0500 Subject: [PATCH] chore: Update schemas to version all types (#383) --- modules/akmods/akmods.tsp | 49 +++++++------ modules/bling/bling.tsp | 21 ++++-- modules/brew/brew.tsp | 61 ++++++++-------- modules/chezmoi/chezmoi.tsp | 43 ++++++------ modules/default-flatpaks/default-flatpaks.tsp | 69 ++++++++++--------- modules/files/files.tsp | 21 +++--- modules/fonts/fonts.tsp | 27 ++++---- modules/gnome-extensions/gnome-extensions.tsp | 27 ++++---- .../gschema-overrides/gschema-overrides.tsp | 17 ++--- modules/initramfs/initramfs.tsp | 11 +-- modules/justfiles/justfiles.tsp | 21 +++--- modules/rpm-ostree/rpm-ostree.tsp | 48 ++++++------- modules/script/script.tsp | 21 +++--- modules/signing/signing.tsp | 13 ++-- modules/systemd/systemd.tsp | 61 ++++++++-------- modules/yafti/yafti.tsp | 17 ++--- 16 files changed, 279 insertions(+), 248 deletions(-) diff --git a/modules/akmods/akmods.tsp b/modules/akmods/akmods.tsp index 1f7a414..a7a4c58 100644 --- a/modules/akmods/akmods.tsp +++ b/modules/akmods/akmods.tsp @@ -1,27 +1,36 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/akmods.json") +@jsonSchema("/modules/akmods-v1.json") +@jsonSchema("/modules/akmods-latest.json") model AkmodsModule { - /** The akmods module is a tool used for managing and installing kernel modules built by Universal Blue. - * https://blue-build.org/reference/modules/akmods/ - */ - type: "akmods"; + /** The akmods module is a tool used for managing and installing kernel modules built by Universal Blue. + * https://blue-build.org/reference/modules/akmods/ + */ + type: "akmods" | "akmods@v1" | "akmods@latest"; - /** The kernel your images uses. - * - main: stock Fedora kernel / main and nvidia images - * - asus: asus kernel / asus images - * - fsync: fsync kernel / not used in any Universal Blue images - * - fsync-ba: fsync kernel, stable version / not used in any Universal Blue images - * - surface: surface kernel / surface images - * - coreos-stable: stock CoreOS kernel / uCore stable images - * - coreos-testing: stock CoreOS Testing kernel / uCore testing images - * - bazzite: Bazzite's kernel / bazzite images - */ - base?: "main" | "asus" | "fsync" | "fsync-ba" | "surface" | "coreos-stable" | "coreos-testing" | "bazzite" = "main"; + /** The kernel your images uses. + * - main: stock Fedora kernel / main and nvidia images + * - asus: asus kernel / asus images + * - fsync: fsync kernel / not used in any Universal Blue images + * - fsync-ba: fsync kernel, stable version / not used in any Universal Blue images + * - surface: surface kernel / surface images + * - coreos-stable: stock CoreOS kernel / uCore stable images + * - coreos-testing: stock CoreOS Testing kernel / uCore testing images + * - bazzite: Bazzite's kernel / bazzite images + */ + base?: + | "main" + | "asus" + | "fsync" + | "fsync-ba" + | "surface" + | "coreos-stable" + | "coreos-testing" + | "bazzite" = "main"; - /** List of akmods to install. - * See all available akmods here: https://github.com/ublue-os/akmods#kmod-packages - */ - install: Array; + /** List of akmods to install. + * See all available akmods here: https://github.com/ublue-os/akmods#kmod-packages + */ + install: Array; } diff --git a/modules/bling/bling.tsp b/modules/bling/bling.tsp index 601fcec..103ae68 100644 --- a/modules/bling/bling.tsp +++ b/modules/bling/bling.tsp @@ -1,13 +1,20 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/bling.json") +@jsonSchema("/modules/bling-v1.json") +@jsonSchema("/modules/bling-latest.json") model BlingModule { - /** The bling module can be used to pull in small "bling" into your image. - * https://blue-build.org/reference/modules/bling/ - */ - type: "bling"; + /** The bling module can be used to pull in small "bling" into your image. + * https://blue-build.org/reference/modules/bling/ + */ + type: "bling" | "bling@v1" | "bling@latest"; - /** List of bling submodules to run / things to install onto your system. */ - install: Array<"rpmfusion" | "negativo17" | "ublue-update" | "1password" | "dconf-update-service" | "gnome-vrr">; + /** List of bling submodules to run / things to install onto your system. */ + install: Array< + | "rpmfusion" + | "negativo17" + | "ublue-update" + | "1password" + | "dconf-update-service" + | "gnome-vrr">; } diff --git a/modules/brew/brew.tsp b/modules/brew/brew.tsp index 6de2e0c..bbfa7eb 100644 --- a/modules/brew/brew.tsp +++ b/modules/brew/brew.tsp @@ -1,42 +1,43 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/brew.json") +@jsonSchema("/modules/brew-v1.json") +@jsonSchema("/modules/brew-latest.json") model BrewModule { - /** The brew module installs Homebrew / Linuxbrew at build time and ensures the package manager remains up-to-date. - * https://blue-build.org/reference/modules/brew/ - */ - type: "brew"; + /** The brew module installs Homebrew / Linuxbrew at build time and ensures the package manager remains up-to-date. + * https://blue-build.org/reference/modules/brew/ + */ + type: "brew" | "brew@v1" | "brew@latest"; - /** Whether to auto-update the Brew binary using a systemd service. */ - "auto-update"?: boolean = true; + /** Whether to auto-update the Brew binary using a systemd service. */ + `auto-update`?: boolean = true; - /** Defines how often the Brew update service should run. The string is passed directly to `OnUnitInactiveSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */ - "update-interval"?: string = "6h"; + /** Defines how often the Brew update service should run. The string is passed directly to `OnUnitInactiveSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */ + `update-interval`?: string = "6h"; - /** Time delay after system boot before the first Brew update runs. The string is passed directly to `OnBootSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */ - "update-wait-after-boot"?: string = "10min"; + /** Time delay after system boot before the first Brew update runs. The string is passed directly to `OnBootSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */ + `update-wait-after-boot`?: string = "10min"; - /** Whether to auto-upgrade all installed Brew packages using a systemd service. */ - "auto-upgrade"?: boolean = true; + /** Whether to auto-upgrade all installed Brew packages using a systemd service. */ + `auto-upgrade`?: boolean = true; - /** Defines how often the Brew upgrade service should run. The string is passed directly to `OnUnitInactiveSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */ - "upgrade-interval"?: string = "8h"; + /** Defines how often the Brew upgrade service should run. The string is passed directly to `OnUnitInactiveSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */ + `upgrade-interval`?: string = "8h"; - /** Time delay after system boot before the first Brew package upgrade runs. The string is passed directly to `OnBootSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */ - "upgrade-wait-after-boot"?: string = "30min"; + /** Time delay after system boot before the first Brew package upgrade runs. The string is passed directly to `OnBootSec` in systemd timer. (Syntax: ['1d', '6h', '10m']). */ + `upgrade-wait-after-boot`?: string = "30min"; - /** Whether to increase nofile limits (limits for number of open files) for Brew installations. - * When set to true, it increases the nofile limits to prevent certain "I/O heavy" Brew packages from failing due to "too many open files" error. - * However, it's important to note that increasing nofile limits can have potential security implications for malicious applications which would try to abuse storage I/O. - * Defaults to false for security purposes. - * - * https://serverfault.com/questions/577437/what-is-the-impact-of-increasing-nofile-limits-in-etc-security-limits-conf - */ - "nofile-limits"?: boolean = false; + /** Whether to increase nofile limits (limits for number of open files) for Brew installations. + * When set to true, it increases the nofile limits to prevent certain "I/O heavy" Brew packages from failing due to "too many open files" error. + * However, it's important to note that increasing nofile limits can have potential security implications for malicious applications which would try to abuse storage I/O. + * Defaults to false for security purposes. + * + * https://serverfault.com/questions/577437/what-is-the-impact-of-increasing-nofile-limits-in-etc-security-limits-conf + */ + `nofile-limits`?: boolean = false; - /** Whether to enable Brew analytics. - * The Homebrew project uses analytics to anonymously collect the information about Brew usage & your system in order to improve the experience of Brew users. - */ - "brew-analytics"?: boolean = true; -} \ No newline at end of file + /** Whether to enable Brew analytics. + * The Homebrew project uses analytics to anonymously collect the information about Brew usage & your system in order to improve the experience of Brew users. + */ + `brew-analytics`?: boolean = true; +} diff --git a/modules/chezmoi/chezmoi.tsp b/modules/chezmoi/chezmoi.tsp index 7706c7f..2ad5a0f 100644 --- a/modules/chezmoi/chezmoi.tsp +++ b/modules/chezmoi/chezmoi.tsp @@ -1,34 +1,35 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/chezmoi.json") +@jsonSchema("/modules/chezmoi-v1.json") +@jsonSchema("/modules/chezmoi-latest.json") model ChezmoiModule { - /** The chezmoi module installs the latest chezmoi release at build time, along with services to clone a dotfile repository and keep it up-to-date. - * https://blue-build.org/reference/modules/chezmoi/ - */ - type: "chezmoi"; + /** The chezmoi module installs the latest chezmoi release at build time, along with services to clone a dotfile repository and keep it up-to-date. + * https://blue-build.org/reference/modules/chezmoi/ + */ + type: "chezmoi" | "chezmoi@v1" | "chezmoi@latest"; - /** Git repository to initialize. */ - repository: string; + /** Git repository to initialize. */ + repository: string; - /** Git branch of the chezmoi repository. */ - branch?: string = ""; + /** Git branch of the chezmoi repository. */ + branch?: string = ""; - /** Whether to enable the modules services globally for all users, if false users need to enable services manually. */ - "all-users"?: boolean = true; + /** Whether to enable the modules services globally for all users, if false users need to enable services manually. */ + `all-users`?: boolean = true; - /** Dotfiles will be updated with this interval. */ - "run-every"?: string = "1d"; + /** Dotfiles will be updated with this interval. */ + `run-every`?: string = "1d"; - /** Dotfile updates will wait this long after a boot before running. */ - "wait-after-boot"?: string = "5m"; + /** Dotfile updates will wait this long after a boot before running. */ + `wait-after-boot`?: string = "5m"; - /** Disable the service that initializes `repository` on users that are logged in or have linger enabled UI. */ - "disable-init"?: boolean = false; + /** Disable the service that initializes `repository` on users that are logged in or have linger enabled UI. */ + `disable-init`?: boolean = false; - /** Disable the timer that updates chezmoi with the set interval. */ - "disable-update"?: boolean = false; + /** Disable the timer that updates chezmoi with the set interval. */ + `disable-update`?: boolean = false; - /** What to do when file different that exists on your repo is has been changed or exists locally. Accepts "skip" or "replace". */ - "file-conflict-policy"?: "skip" | "replace" = "skip"; + /** What to do when file different that exists on your repo is has been changed or exists locally. Accepts "skip" or "replace". */ + `file-conflict-policy`?: "skip" | "replace" = "skip"; } diff --git a/modules/default-flatpaks/default-flatpaks.tsp b/modules/default-flatpaks/default-flatpaks.tsp index 4254cbe..9c6af8b 100644 --- a/modules/default-flatpaks/default-flatpaks.tsp +++ b/modules/default-flatpaks/default-flatpaks.tsp @@ -1,49 +1,50 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/default-flatpaks.json") +@jsonSchema("/modules/default-flatpaks-v1.json") +@jsonSchema("/modules/default-flatpaks-latest.json") model DefaultFlatpaksModule { - /** The default-flatpaks module can be used to install or uninstall flatpaks from a configurable remote on every boot. - * https://blue-build.org/reference/modules/default-flatpaks/ - */ - type: "default-flatpaks"; + /** The default-flatpaks module can be used to install or uninstall flatpaks from a configurable remote on every boot. + * https://blue-build.org/reference/modules/default-flatpaks/ + */ + type: "default-flatpaks" | "default-flatpaks@v1" | "default-flatpaks@latest"; - /** Whether to send a notification after the install/uninstall is finished. */ - notify?: boolean = false; + /** Whether to send a notification after the install/uninstall is finished. */ + notify?: boolean = false; - /** Configuration for system flatpaks. */ - system?: { - /** URL of the repo to add. Defaults to Flathub's URL. */ - "repo-url"?: string = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + /** Configuration for system flatpaks. */ + system?: { + /** URL of the repo to add. Defaults to Flathub's URL. */ + `repo-url`?: string = "https://dl.flathub.org/repo/flathub.flatpakrepo"; - /** Name for the repo to add. */ - "repo-name"?: string = "flathub"; + /** Name for the repo to add. */ + `repo-name`?: string = "flathub"; - /** Pretty title for the repo to add. Not set by default. */ - "repo-title"?: string; + /** Pretty title for the repo to add. Not set by default. */ + `repo-title`?: string; - /** List of Flatpak IDs to install from the repo. */ - install?: Array; + /** List of Flatpak IDs to install from the repo. */ + install?: Array; - /** List of Flatpak IDs to remove. */ - remove?: Array; - }; + /** List of Flatpak IDs to remove. */ + remove?: Array; + }; - /** Configuration for user flatpaks. */ - user?: { - /** URL of the repo to add. Defaults to Flathub's URL. */ - "repo-url"?: string = "https://dl.flathub.org/repo/flathub.flatpakrepo"; + /** Configuration for user flatpaks. */ + user?: { + /** URL of the repo to add. Defaults to Flathub's URL. */ + `repo-url`?: string = "https://dl.flathub.org/repo/flathub.flatpakrepo"; - /** Name for the repo to add. */ - "repo-name"?: string = "flathub"; + /** Name for the repo to add. */ + `repo-name`?: string = "flathub"; - /** Pretty title for the repo to add. Not set by default. */ - "repo-title"?: string; + /** Pretty title for the repo to add. Not set by default. */ + `repo-title`?: string; - /** List of Flatpak IDs to install from the repo. */ - install?: Array; + /** List of Flatpak IDs to install from the repo. */ + install?: Array; - /** List of Flatpak IDs to remove. */ - remove?: Array; - }; -} \ No newline at end of file + /** List of Flatpak IDs to remove. */ + remove?: Array; + }; +} diff --git a/modules/files/files.tsp b/modules/files/files.tsp index f6a826a..ce1a9fe 100644 --- a/modules/files/files.tsp +++ b/modules/files/files.tsp @@ -1,16 +1,17 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/files.json") +@jsonSchema("/modules/files-v1.json") +@jsonSchema("/modules/files-latest.json") model FilesModule { - /** Copy files to your image at build time - * https://blue-build.org/reference/modules/files/ - */ - type: "files"; + /** Copy files to your image at build time + * https://blue-build.org/reference/modules/files/ + */ + type: "files" | "files@v1" | "files@latest"; - /** List of files / folders to copy. */ - files: Array> | Array<{ - source: string; - destination: string; - }>; + /** List of files / folders to copy. */ + files: Array> | Array<{ + source: string; + destination: string; + }>; } diff --git a/modules/fonts/fonts.tsp b/modules/fonts/fonts.tsp index a7c10bb..27159e4 100644 --- a/modules/fonts/fonts.tsp +++ b/modules/fonts/fonts.tsp @@ -1,18 +1,19 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/fonts.json") +@jsonSchema("/modules/fonts-v1.json") +@jsonSchema("/modules/fonts-latest.json") model FontsModule { - /** The fonts module can be used to install fonts from Nerd Fonts or Google Fonts. - * https://blue-build.org/reference/modules/fonts/ - */ - type: "fonts"; - - fonts: { - /** List of Nerd Fonts to install (without the "Nerd Font" suffix). */ - "nerd-fonts"?: Array; + /** The fonts module can be used to install fonts from Nerd Fonts or Google Fonts. + * https://blue-build.org/reference/modules/fonts/ + */ + type: "fonts" | "fonts@v1" | "fonts@latest"; - /** List of Google Fonts to install. */ - "google-fonts"?: Array; - }; -} \ No newline at end of file + fonts: { + /** List of Nerd Fonts to install (without the "Nerd Font" suffix). */ + `nerd-fonts`?: Array; + + /** List of Google Fonts to install. */ + `google-fonts`?: Array; + }; +} diff --git a/modules/gnome-extensions/gnome-extensions.tsp b/modules/gnome-extensions/gnome-extensions.tsp index bcffb09..0e799f8 100644 --- a/modules/gnome-extensions/gnome-extensions.tsp +++ b/modules/gnome-extensions/gnome-extensions.tsp @@ -1,20 +1,21 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/gnome-extensions.json") +@jsonSchema("/modules/gnome-extensions-v1.json") +@jsonSchema("/modules/gnome-extensions-latest.json") model GnomeExtensionsModule { - /** The gnome-extensions module can be used to install GNOME extensions inside system directory. - * https://blue-build.org/reference/modules/gnome-extensions/ - */ - type: "gnome-extensions"; + /** The gnome-extensions module can be used to install GNOME extensions inside system directory. + * https://blue-build.org/reference/modules/gnome-extensions/ + */ + type: "gnome-extensions" | "gnome-extensions@v1" | "gnome-extensions@latest"; - /** List of GNOME extensions to install. - * (case sensitive extension names or extension IDs from https://extensions.gnome.org/) - */ - install?: Array; + /** List of GNOME extensions to install. + * (case sensitive extension names or extension IDs from https://extensions.gnome.org/) + */ + install?: Array; - /** List of system GNOME extensions to uninstall. - * Only use this to remove extensions not installed by your package manager. Those extensions should be uninstalled using the package manager instead. - */ - uninstall?: Array; + /** List of system GNOME extensions to uninstall. + * Only use this to remove extensions not installed by your package manager. Those extensions should be uninstalled using the package manager instead. + */ + uninstall?: Array; } diff --git a/modules/gschema-overrides/gschema-overrides.tsp b/modules/gschema-overrides/gschema-overrides.tsp index 3f3280a..bf4de47 100644 --- a/modules/gschema-overrides/gschema-overrides.tsp +++ b/modules/gschema-overrides/gschema-overrides.tsp @@ -1,13 +1,14 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/gschema-overrides.json") +@jsonSchema("/modules/gschema-overrides-v1.json") +@jsonSchema("/modules/gschema-overrides-latest.json") model GschemaOverridesModule { - /** The gschema-overrides module can be used for including system-setting overrides for GTK-based desktop environments. - * https://blue-build.org/reference/modules/gschema-overrides/ - */ - type: "gschema-overrides"; + /** The gschema-overrides module can be used for including system-setting overrides for GTK-based desktop environments. + * https://blue-build.org/reference/modules/gschema-overrides/ + */ + type: "gschema-overrides" | "gschema-overrides@v1" | "gschema-overrides@latest"; - /** Gschema override files to test and copy to the correct place. */ - include?: Array; -} \ No newline at end of file + /** Gschema override files to test and copy to the correct place. */ + include?: Array; +} diff --git a/modules/initramfs/initramfs.tsp b/modules/initramfs/initramfs.tsp index a159d0d..89f0714 100644 --- a/modules/initramfs/initramfs.tsp +++ b/modules/initramfs/initramfs.tsp @@ -1,10 +1,11 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/initramfs.json") +@jsonSchema("/modules/initramfs-v1.json") +@jsonSchema("/modules/initramfs-latest.json") model InitramfsModule { - /** The initramfs module is used to regenerate initramfs, needed to apply some modifications early in the Linux startup process. - * https://blue-build.org/reference/modules/initramfs/ - */ - type: "initramfs"; + /** The initramfs module is used to regenerate initramfs, needed to apply some modifications early in the Linux startup process. + * https://blue-build.org/reference/modules/initramfs/ + */ + type: "initramfs" | "initramfs@v1" | "initramfs@latest"; } diff --git a/modules/justfiles/justfiles.tsp b/modules/justfiles/justfiles.tsp index caf2d3b..6067275 100644 --- a/modules/justfiles/justfiles.tsp +++ b/modules/justfiles/justfiles.tsp @@ -1,16 +1,17 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/justfiles.json") +@jsonSchema("/modules/justfiles-v1.json") +@jsonSchema("/modules/justfiles-latest.json") model JustfilesModule { - /** The justfiles module makes it easy to include just recipes from multiple files in Universal Blue -based images. - * https://blue-build.org/reference/modules/justfiles/ - */ - type: "justfiles"; + /** The justfiles module makes it easy to include just recipes from multiple files in Universal Blue -based images. + * https://blue-build.org/reference/modules/justfiles/ + */ + type: "justfiles" | "justfiles@v1" | "justfiles@latest"; - /** Whether to validate the syntax of the justfiles against `just --fmt`. (warning: can be very unforgiving) */ - validate?: boolean = false; + /** Whether to validate the syntax of the justfiles against `just --fmt`. (warning: can be very unforgiving) */ + validate?: boolean = false; - /** List of files or subfolders to include into this image. If omitted, all justfiles will be included. */ - include?: Array; -} \ No newline at end of file + /** List of files or subfolders to include into this image. If omitted, all justfiles will be included. */ + include?: Array; +} diff --git a/modules/rpm-ostree/rpm-ostree.tsp b/modules/rpm-ostree/rpm-ostree.tsp index cb5ee2c..718833f 100644 --- a/modules/rpm-ostree/rpm-ostree.tsp +++ b/modules/rpm-ostree/rpm-ostree.tsp @@ -1,33 +1,35 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/rpm-ostree.json") +@jsonSchema("/modules/rpm-ostree-v1.json") +@jsonSchema("/modules/rpm-ostree-latest.json") model RpmOstreeModule { - /** The rpm-ostree module offers pseudo-declarative package and repository management using rpm-ostree. - * https://blue-build.org/reference/modules/rpm-ostree/ - */ - type: "rpm-ostree"; + /** The rpm-ostree module offers pseudo-declarative package and repository management using rpm-ostree. + * https://blue-build.org/reference/modules/rpm-ostree/ + */ + type: "rpm-ostree" | "rpm-ostree@v1" | "rpm-ostree@latest"; - /** List of links to .repo files to download into /etc/yum.repos.d/. */ - repos?: Array; + /** List of links to .repo files to download into /etc/yum.repos.d/. */ + repos?: Array; - /** List of links to key files to import for installing from custom repositories. */ - keys?: Array; + /** List of links to key files to import for installing from custom repositories. */ + keys?: Array; - /** List of folder names under /opt/ to enable for installing into. */ - optfix?: Array; + /** List of folder names under /opt/ to enable for installing into. */ + optfix?: Array; - /** List of RPM packages to install. */ - install?: Array; + /** List of RPM packages to install. */ + install?: Array; - /** List of RPM packages to remove. */ - remove?: Array; + /** List of RPM packages to remove. */ + remove?: Array; - /** List of configurations for `rpm-ostree override replace`ing packages. */ - replace?: Array<{ - /** URL to the source COPR repo for the new packages. */ - "from-repo": string, - /** List of packages to replace using packages from the defined repo. */ - packages: Array, - }>; -} \ No newline at end of file + /** List of configurations for `rpm-ostree override replace`ing packages. */ + replace?: Array<{ + /** URL to the source COPR repo for the new packages. */ + `from-repo`: string; + + /** List of packages to replace using packages from the defined repo. */ + packages: Array; + }>; +} diff --git a/modules/script/script.tsp b/modules/script/script.tsp index 222ab35..62d0552 100644 --- a/modules/script/script.tsp +++ b/modules/script/script.tsp @@ -1,16 +1,17 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/script.json") +@jsonSchema("/modules/script-v1.json") +@jsonSchema("/modules/script-latest.json") model ScriptModule { - /** The script module can be used to run arbitrary bash snippets and scripts at image build time. - * https://blue-build.org/reference/modules/script/ - */ - type: "script"; + /** The script module can be used to run arbitrary bash snippets and scripts at image build time. + * https://blue-build.org/reference/modules/script/ + */ + type: "script" | "script@v1" | "script@latest"; - /** List of bash one-liners to run. */ - snippets?: Array; + /** List of bash one-liners to run. */ + snippets?: Array; - /** List of script files to run. */ - scripts?: Array; -} \ No newline at end of file + /** List of script files to run. */ + scripts?: Array; +} diff --git a/modules/signing/signing.tsp b/modules/signing/signing.tsp index d60c621..2a723dc 100644 --- a/modules/signing/signing.tsp +++ b/modules/signing/signing.tsp @@ -1,10 +1,11 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/signing.json") +@jsonSchema("/modules/signing-v1.json") +@jsonSchema("/modules/signing-latest.json") model SigningModule { - /** The signing module is used to install the required signing policies for cosign image verification with rpm-ostree and bootc. - * https://blue-build.org/reference/modules/signing/ - */ - type: "signing"; -} \ No newline at end of file + /** The signing module is used to install the required signing policies for cosign image verification with rpm-ostree and bootc. + * https://blue-build.org/reference/modules/signing/ + */ + type: "signing" | "signing@v1" | "signing@latest"; +} diff --git a/modules/systemd/systemd.tsp b/modules/systemd/systemd.tsp index d8cdecd..5537b43 100644 --- a/modules/systemd/systemd.tsp +++ b/modules/systemd/systemd.tsp @@ -1,40 +1,41 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/systemd.json") +@jsonSchema("/modules/systemd-v1.json") +@jsonSchema("/modules/systemd-latest.json") model SystemdModule { - /** The systemd module streamlines the management of systemd units during image building. - * https://blue-build.org/reference/modules/systemd/ - */ - type: "systemd"; + /** The systemd module streamlines the management of systemd units during image building. + * https://blue-build.org/reference/modules/systemd/ + */ + type: "systemd" | "systemd@v1" | "systemd@latest"; - /** System unit configuration. */ - system?: { - /** List of systemd units to enable. (runs on system boot) */ - enabled?: Array; + /** System unit configuration. */ + system?: { + /** List of systemd units to enable. (runs on system boot) */ + enabled?: Array; - /** List of systemd units to disable. (does not run on system boot, unless another unit strictly requires it) */ - disabled?: Array; + /** List of systemd units to disable. (does not run on system boot, unless another unit strictly requires it) */ + disabled?: Array; - /** List of systemd units to mask. (does not run on system boot, under any circumstances) */ - masked?: Array; + /** List of systemd units to mask. (does not run on system boot, under any circumstances) */ + masked?: Array; - /** List of systemd units to unmask. (runs on system boot, even if previously masked) */ - unmasked?: Array; - }; + /** List of systemd units to unmask. (runs on system boot, even if previously masked) */ + unmasked?: Array; + }; - /** User unit configuration (with --global to make changes for all users). */ - user?: { - /** List of systemd units to enable. (runs for the users) */ - enabled?: Array; + /** User unit configuration (with --global to make changes for all users). */ + user?: { + /** List of systemd units to enable. (runs for the users) */ + enabled?: Array; - /** List of systemd units to disable. (does not run for the users, unless another unit strictly requires it) */ - disabled?: Array; - - /** List of systemd units to mask. (does not run for the users, under any circumstances) */ - masked?: Array; - - /** List of systemd units to unmask. (runs for the users, even if previously masked) */ - unmasked?: Array; - }; -} \ No newline at end of file + /** List of systemd units to disable. (does not run for the users, unless another unit strictly requires it) */ + disabled?: Array; + + /** List of systemd units to mask. (does not run for the users, under any circumstances) */ + masked?: Array; + + /** List of systemd units to unmask. (runs for the users, even if previously masked) */ + unmasked?: Array; + }; +} diff --git a/modules/yafti/yafti.tsp b/modules/yafti/yafti.tsp index 6b47136..172d95c 100644 --- a/modules/yafti/yafti.tsp +++ b/modules/yafti/yafti.tsp @@ -1,13 +1,14 @@ import "@typespec/json-schema"; using TypeSpec.JsonSchema; -@jsonSchema("/modules/yafti.json") +@jsonSchema("/modules/yafti-v1.json") +@jsonSchema("/modules/yafti-latest.json") model YaftiModule { - /** The yafti module can be used to install yafti and set it up to run on first boot. - * https://blue-build.org/reference/modules/yafti/ - */ - type: "yafti"; + /** The yafti module can be used to install yafti and set it up to run on first boot. + * https://blue-build.org/reference/modules/yafti/ + */ + type: "yafti" | "yafti@v1" | "yafti@latest"; - /** List of custom Flatpaks to inject to the default yafti.yml. Format is: `PrettyName: org.example.flatpak_id` */ - "custom-flatpaks"?: Array>; -} \ No newline at end of file + /** List of custom Flatpaks to inject to the default yafti.yml. Format is: `PrettyName: org.example.flatpak_id` */ + `custom-flatpaks`?: Array>; +}