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 +``` 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`.