Update flatpak.nix

This commit is contained in:
ska
2025-12-25 22:51:10 +00:00
parent e109193ce3
commit 71a44cd2f6

View File

@@ -14,13 +14,14 @@ in {
# 3. Get currently installed Flatpaks # 3. Get currently installed Flatpaks
installedFlatpaks=$(${pkgs.flatpak}/bin/flatpak list --app --columns=application) installedFlatpaks=$(${pkgs.flatpak}/bin/flatpak list --app --columns=application)
# We allow users to install flatpaks on their own, so this part is not active
# 4. Remove any Flatpaks that are NOT in the desired list # 4. Remove any Flatpaks that are NOT in the desired list
for installed in $installedFlatpaks; do # for installed in $installedFlatpaks; do
if ! echo ${toString desiredFlatpaks} | ${grep}/bin/grep -q $installed; then # if ! echo ${toString desiredFlatpaks} | ${grep}/bin/grep -q $installed; then
echo "Removing $installed because it's not in the desiredFlatpaks list." # echo "Removing $installed because it's not in the desiredFlatpaks list."
${pkgs.flatpak}/bin/flatpak uninstall -y --noninteractive $installed # ${pkgs.flatpak}/bin/flatpak uninstall -y --noninteractive $installed
fi # fi
done # done
# 5. Install or re-install the Flatpaks you DO want # 5. Install or re-install the Flatpaks you DO want
for app in ${toString desiredFlatpaks}; do for app in ${toString desiredFlatpaks}; do