Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix!: move yafti.yml to standardized location
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcitec authored and xynydev committed May 10, 2023
1 parent 07642c2 commit 8ee9967
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ matrix:
`yafti` is the uBlue "first boot" installer. It shows up the first time a user logs into uBlue. By default, the menu also shows up again anytime the image's yafti configuration differs from the user's last encounter, so feel free to expand or modify your custom image's yafti configuration over time. Your users will then see the yafti menu again after the OS update, and will be given a chance to install any new additions.

Its configuration can be found in `/usr/etc/yafti.yml` of the installed OS. It includes an optional selection of Flatpaks to install, along with a new group that's automatically added for all Flatpaks declared in `recipe.yml`. You can look at what's done in the config and modify it to your liking.
Its configuration can be found in `/usr/share/ublue-os/firstboot/yafti.yml` of the installed OS. It includes an optional selection of Flatpaks to install, along with a new group that's automatically added for all Flatpaks declared in `recipe.yml`. You can look at what's done in the config and modify it to your liking (in the repository, before building the image, since the installed system file is immutable).

The files `/usr/etc/profile.d/ublue-firstboot.sh` and `/usr/etc/skel.d/.config/autostart/ublue-firstboot.desktop` set up `yafti` so that it starts on boot, which means that you shouldn't touch those files if you wish to retain that functionality.

Expand Down
7 changes: 4 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -oue pipefail

# Helper functions.
RECIPE_FILE="/usr/share/ublue-os/recipe.yml"
YAFTI_FILE="/usr/share/ublue-os/firstboot/yafti.yml"
get_yaml_array() {
mapfile -t "$1" < <(yq -- "$2" "$RECIPE_FILE")
}
Expand Down Expand Up @@ -73,11 +74,11 @@ pip install --prefix=/usr yafti
get_yaml_array flatpaks '.flatpaks[]'
if [[ ${#flatpaks[@]} -gt 0 ]]; then
echo "-- yafti: Adding Flatpaks defined in recipe.yml --"
yq -i '.screens.applications.values.groups.Custom.description = "Flatpaks defined by the image maintainer"' /usr/etc/yafti.yml
yq -i '.screens.applications.values.groups.Custom.default = true' /usr/etc/yafti.yml
yq -i '.screens.applications.values.groups.Custom.description = "Flatpaks defined by the image maintainer"' "$YAFTI_FILE"
yq -i '.screens.applications.values.groups.Custom.default = true' "$YAFTI_FILE"
for pkg in "${flatpaks[@]}"; do
echo "Adding to yafti: ${pkg}"
yq -i ".screens.applications.values.groups.Custom.packages += [{\"$pkg\": \"$pkg\"}]" /usr/etc/yafti.yml
yq -i ".screens.applications.values.groups.Custom.packages += [{\"$pkg\": \"$pkg\"}]" "$YAFTI_FILE"
done
echo "---"
fi
Expand Down
4 changes: 2 additions & 2 deletions recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ rpm:
- firefox-langpacks

# These Flatpaks will be suggested for install after user login, via the yafti
# "first boot" GUI. Everything below will be merged into the "etc/yafti.yml" config
# "first boot" GUI. Everything below will be merged into the "yafti.yml" config
# on build, in a category named "Custom". If you prefer, you can instead remove
# everything below and directly edit "etc/yafti.yml" to have more control.
# everything below and directly edit "yafti.yml" to have more control.
# This is just an example selection.
flatpaks:
- org.mozilla.firefox
Expand Down
File renamed without changes.

0 comments on commit 8ee9967

Please sign in to comment.