ublue-os / fleek

[deprecated] Own your $HOME
https://getfleek.dev
Apache License 2.0
833 stars 24 forks source link

Add support for declarative flatpak #325

Open daynashaw opened 10 months ago

daynashaw commented 10 months ago

Is your feature request related to a problem? Please describe. I use the flatpack version of discord and some other picky applications. I have to install these imperatively and there is no living record of their installation other than my memory. This is low hanging fruit to reduce stateful data. This could also have the benefit of simplifying the base image's flatpak installer portal.

Describe the solution you'd like I would like to see the this repo https://github.com/GermanBread/declarative-flatpak integrated into fleek somehow. It has simple modules for controlling the behavior of flatpak including installation and configuration. It is a comprehensive solution to managing them with nix. I would like to see a subsection added to the fleek configuration for flatpack applications and their configuration (overrides...). I would also like to see flatpack management added to the fleek command itself, similar to the way installing regular nix software works. Perhaps fleek flatpak add discord and fleek flatpak override discord foo=barcould be appropriate.

Describe alternatives you've considered I have considered ejecting fleek and configurating home-manager manually, but it would really suck to give up all the convenience and git integration of fleek. I tried looking over the nix files that fleek generates, but I don't believe there is a way for me to add this as a one off, I believe I can only use this tool with fleek by having it integrated into fleek itself.

Additional context There are multiple attempts out there to make flatpak declarative. Also of varying quality. Many of those projects are abandoned. I am requesting this repo in particular because it is actively maintained with commits from today, the interface is simple, and it seems like it would be reliable. It also seems like it doesn't run afoul of the goals of fleek.

bayazidbh commented 10 months ago

Wanted to ask this myself, would be really handy and another great reason to recommend Fleek for new Nix users.

I think the way it can be done is that fleek flatpak add discord, much like flatpak install, does a search and asks the user to press the number associated for the entry, which is then used as real name to be added to the list in fleek. There's also the question of user's existing flatpak as well.

I think the biggest concern is the how the new version of the module isn't working well with non-NixOS HM https://github.com/GermanBread/declarative-flatpak/issues/9. The old-stable branch does work fine though but that has issues handling manually installed .flatpak files (that isn't part of a remote registered on user's flatpak).