You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is kind of an issue for those of us that like me prefer to configure my flatpaks interactively, then dump it into a nix file so my desired state is declarative.
) the module assumes that the saved state is perfect, and will fail if the user have manually uninstalled the package beforehand. A simple check beforehand to make sure it is installed, something like ${pkgs.flatpak}/bin/flatpak info "$APP_ID" && ${pkgs.flatpak}/bin/flatpak uninstall --${installation} -y $APP_ID would fix this.
It seems the remotes already have this style of check implemented, just a tiny bit differently than what I did above.
echo "Remote '$REMOTE_NAME' not found in flatpak remotes"
fi
PS: not sure if anyone cares, but this is currently my setup to "save" the live flatpaks to nix:
flatpak.nix
{home.packages=withpkgs;[flatpak(pkgs.writeShellApplication{name="zzz-save-flatpak2nix";runtimeInputs=withpkgs;[flatpakgnusedcoreutilsnixfmt];derivationArgs={nativeBuildInputs=[pkgs.installShellFiles];};excludeShellChecks=["SC2145"];text=builtins.readFile./save-flatpak2nix.sh;})];
...
# Use the shell script zzz-save-flatpak2nix to update desired remotes and packages from live system.services.flatpak=import./flatpak2nix.nix//{enable=true;
...
};
...
{remotes=[{name="Slicer";location="https://rafaelpalomar.github.io/org.slicer.Slicer-flatpak-repository";}{name="flathub";location="https://dl.flathub.org/repo/";}];packages=[#### Apps{origin="Slicer";appId="org.slicer.Slicer/x86_64/master";}"xyz.tytanium.DoorKnocker/x86_64/stable""rocks.koreader.KOReader/x86_64/stable""rest.insomnia.Insomnia/x86_64/stable"...#### Runtimes that directly extends an app
...
"io.github.ungoogled_software.ungoogled_chromium.Codecs/x86_64/stable""com.jeffser.Alpaca.Plugins.AMD/x86_64/stable"];}
The text was updated successfully, but these errors were encountered:
This is kind of an issue for those of us that like me prefer to configure my flatpaks interactively, then dump it into a nix file so my desired state is declarative.
During the removal of [packages] (
nix-flatpak/modules/installer.nix
Line 111 in 8bdc254
${pkgs.flatpak}/bin/flatpak info "$APP_ID" && ${pkgs.flatpak}/bin/flatpak uninstall --${installation} -y $APP_ID
would fix this.It seems the remotes already have this style of check implemented, just a tiny bit differently than what I did above.
nix-flatpak/modules/remotes.nix
Lines 31 to 35 in 8bdc254
PS: not sure if anyone cares, but this is currently my setup to "save" the live flatpaks to nix:
flatpak.nix
save-flatpak2nix.sh
example snippet of flatpak2nix.nix
The text was updated successfully, but these errors were encountered: