Skip to content

Commit

Permalink
Merge pull request #1 from ublue-os/template
Browse files Browse the repository at this point in the history
From head
  • Loading branch information
m0ngr31 authored Jan 25, 2024
2 parents 86ef03c + 535ed93 commit 28362ac
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 16 additions & 2 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -39,4 +39,18 @@ install:
- dunst
- rofi
- kitty
```
```
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
```
2 changes: 1 addition & 1 deletion modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down

0 comments on commit 28362ac

Please sign in to comment.