fix!: move yafti.yml to standardized location

This commit is contained in:
Arcitec
2023-05-10 19:02:51 +02:00
committed by Eino Rauhala
parent 07642c2f43
commit 8ee996722f
4 changed files with 7 additions and 6 deletions

View File

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

View File

@@ -5,6 +5,7 @@ set -oue pipefail
# Helper functions. # Helper functions.
RECIPE_FILE="/usr/share/ublue-os/recipe.yml" RECIPE_FILE="/usr/share/ublue-os/recipe.yml"
YAFTI_FILE="/usr/share/ublue-os/firstboot/yafti.yml"
get_yaml_array() { get_yaml_array() {
mapfile -t "$1" < <(yq -- "$2" "$RECIPE_FILE") mapfile -t "$1" < <(yq -- "$2" "$RECIPE_FILE")
} }
@@ -73,11 +74,11 @@ pip install --prefix=/usr yafti
get_yaml_array flatpaks '.flatpaks[]' get_yaml_array flatpaks '.flatpaks[]'
if [[ ${#flatpaks[@]} -gt 0 ]]; then if [[ ${#flatpaks[@]} -gt 0 ]]; then
echo "-- yafti: Adding Flatpaks defined in recipe.yml --" 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.description = "Flatpaks defined by the image maintainer"' "$YAFTI_FILE"
yq -i '.screens.applications.values.groups.Custom.default = true' /usr/etc/yafti.yml yq -i '.screens.applications.values.groups.Custom.default = true' "$YAFTI_FILE"
for pkg in "${flatpaks[@]}"; do for pkg in "${flatpaks[@]}"; do
echo "Adding to yafti: ${pkg}" 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 done
echo "---" echo "---"
fi fi

View File

@@ -74,9 +74,9 @@ rpm:
- firefox-langpacks - firefox-langpacks
# These Flatpaks will be suggested for install after user login, via the yafti # 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 # 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. # This is just an example selection.
flatpaks: flatpaks:
- org.mozilla.firefox - org.mozilla.firefox