Introduction to Just

just

just is a task runner similar to make, but designed to run project-specific commands, it’s not a build system.

The command is aliased to ujust in all Universal Blue images

This allows us to ship common aliases and scripts through one unified command. It can run scripts, accept command line arguments, and gives us the flexibility to ship shared aliases. In Universal Blue we use ujust to have a set of community maintained aliases because that’s a really great cloud-native pattern that we can apply to the desktop.

All Universal Blue images include ujust and justfiles with quality-of-life commands and other convenient shortcuts that have been submitted by the community. Contributions accepted!

ujust --choose will show you all of the commands and the scripts they execute:

Example Commands

Typing ujust in the command line will show possible commands and descriptions. Here are some common commands included in the Universal Blue images:

  • ujust bios - boot into UEFI/bios. Useful for multiple boot systems
  • ujust changelogs - show a changelog between the running system and the latest updates
  • ujust clean-system - clean up old containers and packaging metadata
  • ujust distrobox-<name-of-distro> - E.g. ujust distrobox-fedora - pre-made distroboxes of common distributions
  • ujust update - update all packages, flatpaks, and distroboxes

Nvidia Images

  • ujust configure-nvidia - Configure the Nvidia driver, enable VAAPI support, test CUDA support
  • ujust configure-nvidia-optimus - Configure Nvidia Optimus

Secure boot

Commands are updated and maintained by the community, feel free to submit a command if you feel it is something that would be useful for all users.

Set up and configuration

ujust comes set up with Universal Blue images out of the box. There should be a collection of justfiles in /usr/share/ublue-os/just.

  • 00-default.just is a justfile available in all main and derived images. It includes common system recipes such as ujust update.
  • 10-update.just is a justfile available in all main and derived images. It is specifically designed around updating your image and updates your system packages, installed flatpak applications, and containers all at once.
  • 20-clean.just is a justfile available in all main and derived images. It is designed around cleaning your system. Cleans up containers, unused flatpak dependencies, optimises Nix if installed, and cleans up older system deployments.
  • 30-distrobox.just is a justfile available in all main and derived images. It is centered around creating Distrobox containers with ease.
  • 40-nvidia.just is a justfile available in all nvidia and derived images. It includes Nvidia-specific recipes such as ujust nvidia-set-kargs.
  • 50-akmods.just is a justfile available in nvidia and derived images. It may also be in some speciality images too. It is a layer to add extra kernel modules to the image and is mainly used for better hardware support.
  • 60-custom.just is a justfile available in startingpoint and derived images. It is intended to have recipes provided by the custom image maintainer.

You can run ujust to list available recipes and ujust <recipename> to execute them. See the ublue-os-just folder in the config-repo or just view the included .just-files for the source code of these recipes.

You can add custom recipes to the justfile in your home directory. Read the documentation on proper syntax.


Original Docs and Cheatsheet: Justin Garrison

3 Likes

For those looking to Enable VAAPI on Firefox based browsers (ex. Floorp, Mercury) on Nvidia GPUs like it is for firefox aka ujust nvidia-setup-firefox-vaapi
Enable flag widget.dmabuf.force-enabled to true
src: bazzite/system_files/nvidia/shared/usr/share/ublue-os/firefox-config/02-bazzite-nvidia.js at fbc25a719c81f673deca5fe6a3baabc661ec2a58 · ublue-os/bazzite · GitHub