-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(default-flatpaks): version 2 (nushell) #336
base: main
Are you sure you want to change the base?
Conversation
this version just sets up the config file but nothing to read it and install the flatpaks after boot
Regarding code structure, it looks cleaner, simpler & I generally like it. Only thing which clutters things very much is Is JSON as a config format necessarry? I find Also printing the message for every checked FlatHub flatpak ID is too much imo, it should only print success message once & print error when ID is wrong. Recipe format looks good to me, except maybe instead of Thanks for starting this PR, I'll look into learning Nushell, so I can also contribute |
Nice!
Ok, maybe I went a bit overboard with that. I'll fix that in the next commits. Sure
Do we? I haven't seen that.
It's not a config format for humans, it won't be writeable as it will exist only in the
Those "modifications" can't actually modify each other, though... I chose "installations", because it IMO reflects that each entry means one set of Flatpaks installed from a specific repo to a specific scope. I guess it feels redundant with the |
It's easier to read for users who want to know what's modified in the image, hence the reason I insist on it.
|
I don't really like that either, because it's two-parted and does not feel like it makes sense for a list of separate configurations. Maybe |
Looks good to me |
Looking at flatpak repo, I see that it got support for specifying system repos in I think that we can specify repos there, with disadvantage that it can't be removed by local-user (or advantage, depending on how you look at it). In that case, Shipping disabled repos OOTB is not supported though, so Fedora does it in a different way (just saying if wondering why Fedora doesn't utilize This would need to be tested though. |
…of post-boot part
Latest commit contains initial implementation of the post-boot parts. There might be some overlooked functionality. You should look through especially the TODOs in the system setup script, if you want to implement some part of this PR. |
I tried to search for information about |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all points addressed (will think later about notify-send), but here's my initial feedback
I merged the changes I mentioned in review to So please look there for my updated suggestions. |
@xynydev About not implementing flatpak removal & by that, user-config functionality for |
I think my definition is just disabling the systemd services. But it may be documented that a user could Ideally the same scripts that are used as systemd services could also be run manually from the terminal. Those scripts would also be able to confirm the changes (including deletions, if we implement that) before doing them. There's possibilities there, one is allowing image maintainers to set how deletions are done and what changes need user confirmation, how that can be given, etc. |
If there's no clean way, we could just say that it's unsupported. It seems you solved this in v1 somehow, though. |
Well, you can implement it the way I did in v1, or if you think it's too hackable, drop it. I think it is the only way to reliably show notifications. |
Our current setup is to only put what's necessary in Currently, we additionally put binaries & systemd services + timers there. I think that we should copy them directly to their appropriate locations instead of having them in What do you think? |
Sure, sounds reasonable. I initially tried to do with everything being symlinks from there, but that ended up not being functional. |
…cing them in `/usr/share/...`
…iles to `/usr/share/...`
This PR is a draft of the rewrite of
default-flatpaks
to support multiple repositories, pioneer Nushell-based modules, and rethink the config structure.Current version implements only the build-time part. Plan is to write to
/usr/share/bluebuild/default-flatpaks/configuration.json
at build time and read from there in the post-boot parts.The recipe format is still up for debate. I didn't end up using anything in #146 for now. The current approach is basically the same as my original suggestion, except that one module call can install Flatpaks in multiple scopes from multiple repositories. The terminology still feels off. Feel free to suggest improvements.
Also feel free to look at the source code to see if you mostly understand it and if it is more readable than the v1 source.
The syntax highlighting on GitHub might be a bit weird, though, because I had to make the file end in
.sh
due to our current system hardcoding that in. I'm not sure what we could do about that, maybe make it possible to omit the file extension entirely.Testing
recipe:
example output: