Skip to content

Commit

Permalink
Merge branch 'main' into dnf-module
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpinder authored Feb 3, 2025
2 parents 9a61cdf + be0201c commit c967d0c
Show file tree
Hide file tree
Showing 19 changed files with 399 additions and 286 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# BlueBuild Modules   [![build-ublue](https://github.com/blue-build/modules/actions/workflows/build.yml/badge.svg)](https://github.com/blue-build/modules/actions/workflows/build.yml)
# BlueBuild Modules   [![build-individual](https://github.com/blue-build/modules/actions/workflows/build-individual.yml/badge.svg)](https://github.com/blue-build/modules/actions/workflows/build-individual.yml)

This repository contains the default official module repository for [BlueBuild](https://blue-build.org/). See [./modules/](./modules/) for the module source code. See the [website](https://blue-build.org/reference/module/) for module documentation. See [How to make a custom module](https://blue-build.org/how-to/making-modules/) and [Contributing](https://blue-build.org/learn/contributing/) for help with making custom modules and contributing.

Expand Down
55 changes: 34 additions & 21 deletions modules/akmods/akmods.tsp
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
import "@typespec/json-schema";
using TypeSpec.JsonSchema;

@jsonSchema("/modules/akmods.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";
@jsonSchema("/modules/akmods-latest.json")
model AkmodsModuleLatest {
...AkmodsModuleV1;
}

@jsonSchema("/modules/akmods-v1.json")
model AkmodsModuleV1 {
/** 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<string>;
/** List of akmods to install.
* See all available akmods here: https://github.com/ublue-os/akmods#kmod-packages
*/
install: Array<string>;
}
27 changes: 19 additions & 8 deletions modules/bling/bling.tsp
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import "@typespec/json-schema";
using TypeSpec.JsonSchema;

@jsonSchema("/modules/bling.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";
@jsonSchema("/modules/bling-latest.json")
model BlingModuleLatest {
...BlingModuleV1;
}

@jsonSchema("/modules/bling-v1.json")
model BlingModuleV1 {
/** 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">;
}
17 changes: 17 additions & 0 deletions modules/bling/installers/1password.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,23 @@ chmod 4755 /usr/lib/1Password/chrome-sandbox
# It only hardens it against environmental tampering.
BROWSER_SUPPORT_PATH="/usr/lib/1Password/1Password-BrowserSupport"


# Add .desktop file and icons
if [ -d /usr/share/applications ]; then
# xdg-desktop-menu will only be available if xdg-utils is installed, which is likely but not guaranteed
if [ -n "$(which xdg-desktop-menu)" ]; then
xdg-desktop-menu install --mode system --novendor /usr/lib/1Password/resources/1password.desktop
xdg-desktop-menu forceupdate
else
install -m0644 /usr/lib/1Password/resources/1password.desktop /usr/share/applications
fi
fi
if [ -d /usr/share/icons ]; then
cp -rf /usr/lib/1Password/resources/icons/* /usr/share/icons/
# Update icon cache
gtk-update-icon-cache -f -t /usr/share/icons/hicolor/
fi

chgrp "${GID_ONEPASSWORD}" "${BROWSER_SUPPORT_PATH}"
chmod g+s "${BROWSER_SUPPORT_PATH}"

Expand Down
83 changes: 44 additions & 39 deletions modules/brew/brew.tsp
Original file line number Diff line number Diff line change
@@ -1,42 +1,47 @@
import "@typespec/json-schema";
using TypeSpec.JsonSchema;

@jsonSchema("/modules/brew.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";

/** 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";

/** 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;

/** 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";

/** 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;
}
@jsonSchema("/modules/brew-latest.json")
model BrewModuleLatest {
...BrewModuleV1;
}

@jsonSchema("/modules/brew-v1.json")
model BrewModuleV1 {
/** 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;

/** 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";

/** 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";

/** 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 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;
}
49 changes: 27 additions & 22 deletions modules/chezmoi/chezmoi.tsp
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
import "@typespec/json-schema";
using TypeSpec.JsonSchema;

@jsonSchema("/modules/chezmoi.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";
@jsonSchema("/modules/chezmoi-latest.json")
model ChezmoiModuleLatest {
...ChezmoiModuleV1;
}

@jsonSchema("/modules/chezmoi-v1.json")
model ChezmoiModuleV1 {
/** 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";
}
75 changes: 40 additions & 35 deletions modules/default-flatpaks/default-flatpaks.tsp
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
import "@typespec/json-schema";
using TypeSpec.JsonSchema;

@jsonSchema("/modules/default-flatpaks.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";
@jsonSchema("/modules/default-flatpaks-latest.json")
model DefaultFlatpaksModuleLatest {
...DefaultFlatpaksModuleV1;
}

/** Whether to send a notification after the install/uninstall is finished. */
notify?: boolean = false;
@jsonSchema("/modules/default-flatpaks-v1.json")
model DefaultFlatpaksModuleV1 {
/** 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";

/** 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";
/** Whether to send a notification after the install/uninstall is finished. */
notify?: boolean = false;

/** Name for the repo to add. */
"repo-name"?: string = "flathub";
/** 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";

/** Pretty title for the repo to add. Not set by default. */
"repo-title"?: string;
/** Name for the repo to add. */
`repo-name`?: string = "flathub";

/** List of Flatpak IDs to install from the repo. */
install?: Array<string>;
/** Pretty title for the repo to add. Not set by default. */
`repo-title`?: string;

/** List of Flatpak IDs to remove. */
remove?: Array<string>;
};
/** List of Flatpak IDs to install from the repo. */
install?: Array<string>;

/** 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";
/** List of Flatpak IDs to remove. */
remove?: Array<string>;
};

/** Name for the repo to add. */
"repo-name"?: string = "flathub";
/** 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";

/** Pretty title for the repo to add. Not set by default. */
"repo-title"?: string;
/** Name for the repo to add. */
`repo-name`?: string = "flathub";

/** List of Flatpak IDs to install from the repo. */
install?: Array<string>;
/** Pretty title for the repo to add. Not set by default. */
`repo-title`?: string;

/** List of Flatpak IDs to remove. */
remove?: Array<string>;
};
}
/** List of Flatpak IDs to install from the repo. */
install?: Array<string>;

/** List of Flatpak IDs to remove. */
remove?: Array<string>;
};
}
27 changes: 16 additions & 11 deletions modules/files/files.tsp
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
import "@typespec/json-schema";
using TypeSpec.JsonSchema;

@jsonSchema("/modules/files.json")
model FilesModule {
/** Copy files to your image at build time
* https://blue-build.org/reference/modules/files/
*/
type: "files";
@jsonSchema("/modules/files-latest.json")
model FilesModuleLatest {
...FilesModuleV1;
}

@jsonSchema("/modules/files-v1.json")
model FilesModuleV1 {
/** 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<Record<string>> | Array<{
source: string;
destination: string;
}>;
/** List of files / folders to copy. */
files: Array<Record<string>> | Array<{
source: string;
destination: string;
}>;
}
Loading

0 comments on commit c967d0c

Please sign in to comment.