From 8ee996722f698d585651b252d60ef57d59fc1627 Mon Sep 17 00:00:00 2001 From: Arcitec <38923130+Arcitec@users.noreply.github.com> Date: Wed, 10 May 2023 19:02:51 +0200 Subject: [PATCH] fix!: move yafti.yml to standardized location --- README.md | 2 +- build.sh | 7 ++++--- recipe.yml | 4 ++-- {etc => usr/share/ublue-os/firstboot}/yafti.yml | 0 4 files changed, 7 insertions(+), 6 deletions(-) rename {etc => usr/share/ublue-os/firstboot}/yafti.yml (100%) diff --git a/README.md b/README.md index d9e3106..672b8f1 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/build.sh b/build.sh index bf98d16..9e9cf3b 100644 --- a/build.sh +++ b/build.sh @@ -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") } @@ -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 diff --git a/recipe.yml b/recipe.yml index 6a019df..5883feb 100644 --- a/recipe.yml +++ b/recipe.yml @@ -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 diff --git a/etc/yafti.yml b/usr/share/ublue-os/firstboot/yafti.yml similarity index 100% rename from etc/yafti.yml rename to usr/share/ublue-os/firstboot/yafti.yml