read .flatpaks[] in recipe.yml and add declared packages to their own package group in yafti
22 lines
925 B
Bash
22 lines
925 B
Bash
# remove the default firefox (from fedora) in favor of the flatpak
|
|
rpm-ostree override remove firefox firefox-langpacks
|
|
|
|
echo "-- Installing RPMs defined in recipe.yml --"
|
|
rpm_packages=$(yq '.rpms[]' < /etc/ublue-recipe.yml)
|
|
for pkg in $rpm_packages; do \
|
|
echo "Installing: ${pkg}" && \
|
|
rpm-ostree install $pkg; \
|
|
done
|
|
echo "---"
|
|
|
|
# install yafti to install flatpaks on first boot, https://github.com/ublue-os/yafti
|
|
pip install --prefix=/usr yafti
|
|
|
|
# add a package group for yafti using the packages defined in recipe.yml
|
|
yq -iy '.screens.applications.values.groups.Custom.description = "Flatpaks defined by the image maintainer"' /etc/yafti.yml
|
|
yq -iy '.screens.applications.values.groups.Custom.default = true' /etc/yafti.yml
|
|
flatpaks=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml)
|
|
for pkg in $flatpaks; do \
|
|
yq -iy ".screens.applications.values.groups.Custom.packages += [{'$pkg': '$pkg'}]" /etc/yafti.yml \
|
|
done
|