Skip to content

justfiles

The justfiles module makes it easy to include just recipes from multiple files into a systemwide justfile.

On images derived from Universal Blue, these recipes will be available under the ujust command, while on other images BlueBuild’s blujust command can be used to access them.

It can be useful for example when utilizing DE-specific justfiles when building multiple images.

Just is a command runner (kind of like a simpler make) that can be used to supply arbitrary scripts under a single shell command.

Usage of Just as a system-wide command runner was popularized by Universal Blue with ujust.

Images based on Universal Blue bundle a set of these scripts, called recipes, which can be accessed with the ujust command.

The blujust command will be installed if ujust is not detected. This will allow base image maintainers to take advantage of the pattern popularized by Universal Blue without having to directly depend on their images.

For more information, refer to these links:

  1. The module checks if the files/justfiles/ folder is present.

    • If it’s not there, it fails.
  2. The module finds all .just files inside of the files/justfiles/ folder or starting from the relative path specified under include.

    • If no .just files are found, it fails.

    • The structure of the files/justfiles/ folder does not matter, folders/files can be placed in there however desired, the module will find all .just files.

    • Optionally, the .just files can be validated.

  3. The module copies over the files/folders containing .just files to /usr/share/bluebuild/justfiles/.

    • The folder structure of the copy destination remains the same as in the config folder.
  4. The module generates import lines and appends them to the /usr/share/ublue-os/just/60-custom.just file.

    • The module does not overwrite the destination file. New lines are added to an existing file.

    • If the generated import lines are already present, the module skips them to avoid duplications.

Place all your .just files or folders with .just files inside the files/justfiles/ folder. If that folder doesn’t exist, create it.

By default, the module will import all files with names ending in .just from files/justfiles/. You can also specify files or subfolders under include, and they will be the only ones imported.

If you also want to validate your justfiles, set validate: true. The validation can be very unforgiving and is turned off by default.

  • The validation command usually prints huge number of lines. To avoid cluttering up the logs, the module will only tell you which files did not pass the validation. You can then use the command just --fmt --check --unstable --justfile <DESTINATION FILE> to troubleshoot them.
type: justfiles
validate: true
install: true
include:
- common
- gnome/monitors.just
- shared/flatpak/fix-theming.just
- justfile1.just

Whether to validate the syntax of the justfiles against just --fmt. (warning: can be very unforgiving)

Default: false

List of files or subfolders to include into this image. If omitted, all justfiles will be included.

Install just via the package manager. *

Default: false