From dfb6abffa168d0dd227dc9d3a5a8bd9274f63c57 Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:10:17 +0000 Subject: [PATCH 1/2] docs: improve modules section in config readme (#209) (#217) --- config/README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/config/README.md b/config/README.md index 946c73f..53892ed 100644 --- a/config/README.md +++ b/config/README.md @@ -22,7 +22,7 @@ This repository fetches some useful default modules from [`ublue-os/bling`](http For a comprehensive list of modules, their in-depth documentation and example configuration, check out [the Modules page on the website](https://universal-blue.org/tinker/modules/). -### Building multiple images and including module configuration from other files and +### Building multiple images and including module configuration from other files To build multiple images, you need to create another recipe.yml file, which you should name based on what kind of image you want it to build. Then, edit the [`build.yml`](../.github/workflows/build.yml) file. Inside the file, under `jobs: strategy: matrix:`, there's a list of recipe files to build images, which you need to add your new recipe file to. These should be paths to files inside the `config` directory. @@ -39,4 +39,18 @@ install: - dunst - rofi - kitty -``` \ No newline at end of file +``` +An external module can also include multiple modules. +```yaml +# config/common.yml +modules: + - type: files + files: + - usr: /usr + - type: rpm-ostree + install: + - i3 + - dunst + - rofi + - kitty +``` From 535ed937abfa47a47d3c0198792906cae7a60fbb Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:14:18 +0000 Subject: [PATCH 2/2] docs: change outdated info about minor module envvar (#216) --- modules/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/README.md b/modules/README.md index 9aac889..40a8bc8 100644 --- a/modules/README.md +++ b/modules/README.md @@ -6,7 +6,7 @@ Each module intended for public usage should include a `README.md` file inside i Modules get only the configuration options given to them in the recipe.yml, not the configuration of other modules or any top-level keys. The configuration is given as the first argument as a single-line json string. You can check out the default modules for examples on how to parse such string using `yq` or `jq`. -Additionally, each module has access to four environment variables, `CONFIG_DIRECTORY` pointing to the Startingpoint directory in `/usr/share/ublue-os/`, `IMAGE_NAME` being the name of the image as declared in the recipe, `BASE_IMAGE` being the URL of the container image used as the base (FROM) in the image, and `OS_VERSION` being the `VERSION_ID` from `/usr/lib/os-release`. +Additionally, each module has access to four environment variables, `CONFIG_DIRECTORY` pointing to the directory containing the confiuration files for the build (`/tmp/config`), `IMAGE_NAME` being the name of the image as declared in the recipe, `BASE_IMAGE` being the URL of the container image used as the base (FROM) in the image, and `OS_VERSION` being the `VERSION_ID` from `/usr/lib/os-release`. When running modules, the working directory is the `CONFIG_DIRECTORY`.