Adding "post-install" programs that aren't part of the image
Hey, just getting started with fedora silverblue and discovering bluebuild. I'm trying to still build up an understanding and approach of where things should go.
The intro docs say resist the urge to add the whole universe (https://blue-build.org/learn/mindset/#resist-the-urge-to-add-the-entire-universe), so my question is what's the approach to handling those other flatpaks, etc. Is this something people would use justfiles for? Something else? Or do you just install those by hand once and hope you don't need to do it again? Coming from nixOS if that helps.
The intro docs say resist the urge to add the whole universe (https://blue-build.org/learn/mindset/#resist-the-urge-to-add-the-entire-universe), so my question is what's the approach to handling those other flatpaks, etc. Is this something people would use justfiles for? Something else? Or do you just install those by hand once and hope you don't need to do it again? Coming from nixOS if that helps.
35 Replies
You can install whatever flatpaks you want while using your computer. The flatpak module is just there to make sure those are installed for you via a
systemd service. Anything that has to be installed in the more traditional sense is generally going to be put in the recipe. I install all of my dev tools into my image. It makes my image bigger, but they are part of the OS. Flatpaks run in containers and are installed in your home directory (user) or in /var (system) which is writeableNot sure I understand, the flatpaks listed in the recipie don't actually end up part of the image?
No, they get installed at boot
Nice
Same with the programs in the DNF module too?
No, dnf installs on the image
Ah okay
That's what I meant in the traditional sense
Flatpak is a runtime only system
So you would install something like ripgrep into the image?
Or if you were using a different shell?
If you use
dnf to install it
Any script that would install into say /usr/local/bin (symlinked in /var/usrlocal) at runtime would work. Anything that installs into your home dir will work
Anything trying to install into /usr/bin/ will not work at runtime as those are readonly path mounted from your image
So you could do cargo install ripgrep at runtime if you wantedGotcha, I'm just trying to understand an example of what kind of dev tools you install directly into the image
Oh interesting
Okay, one thing I'm still trying to figure out is the per-project stuff.
??
LIke if you are working on project A that's using elixir 1.17 and project B that is using elixir 1.18, what's your approach there?
You can always use distrobox for something like that
Distrobox
Use any linux distribution inside your terminal.
Sure, I'm just asking what's your approach
I'm usually developing rust projects
I just use
rustup for managing thatComing from nix, I'd normally have elixir (latest) listed in my userspace config, and then each project would have its own flake that lists the specific version for that project
Hmm okay so you're handling that the same way you would on just any other distro
Pretty much
Cool, thanks for sharing
It's just a system that packs it all into a container image
It's not a complex graph of dependencies like nix can be
Each module you define in your recipe is just a
RUN instruction in a Containerfile that runs scripts that take in the the module information and perform actions on it
You can get a better sense of what it's doing if you run bluebuild generate <recipe_path> from the root of your repoLooking at that right now actually
Like I said, I'm still new to the whole fedora atomic thing
If you've ever used docker or podman, it's that same system
Sure, I think the snags I've run into are adding the things like my terminal, editor, that kind of stuff. Things that I want universally available
I do that for helix
That's for something you're building from source or what?
Yes
So you don't pollute your final image with all the dev tools you need to build it
Ah okay, so I'm guessing it's basically just another build stage in the containfile that copies some final built artifact
Yup
Makes sense
Maybe I'll try setting up devpod for a project and see if that takes the place of the per-project flakes for me
Yeah the Ublue team uses those
Well looks like my iso is done flashing so here goes nothing
Thanks
Have fun