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.
BlueBuild
Thinking like a distribution
A guide in my new Starlight docs site.
35 Replies
Luke Skywunker
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 writeable
matt_savvy
matt_savvyOP2w ago
Not sure I understand, the flatpaks listed in the recipie don't actually end up part of the image?
Luke Skywunker
No, they get installed at boot
matt_savvy
matt_savvyOP2w ago
Nice Same with the programs in the DNF module too?
Luke Skywunker
No, dnf installs on the image
matt_savvy
matt_savvyOP2w ago
Ah okay
Luke Skywunker
That's what I meant in the traditional sense Flatpak is a runtime only system
matt_savvy
matt_savvyOP2w ago
So you would install something like ripgrep into the image? Or if you were using a different shell?
Luke Skywunker
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 wanted
matt_savvy
matt_savvyOP2w ago
Gotcha, I'm just trying to understand an example of what kind of dev tools you install directly into the image
matt_savvy
matt_savvyOP2w ago
Oh interesting Okay, one thing I'm still trying to figure out is the per-project stuff.
Luke Skywunker
??
matt_savvy
matt_savvyOP2w ago
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?
Luke Skywunker
You can always use distrobox for something like that
Luke Skywunker
Distrobox
Use any linux distribution inside your terminal.
matt_savvy
matt_savvyOP2w ago
Sure, I'm just asking what's your approach
Luke Skywunker
I'm usually developing rust projects I just use rustup for managing that
matt_savvy
matt_savvyOP2w ago
Coming 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
Luke Skywunker
Pretty much
matt_savvy
matt_savvyOP2w ago
Cool, thanks for sharing
Luke Skywunker
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 repo
matt_savvy
matt_savvyOP2w ago
Looking at that right now actually Like I said, I'm still new to the whole fedora atomic thing
Luke Skywunker
If you've ever used docker or podman, it's that same system
matt_savvy
matt_savvyOP2w ago
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
Luke Skywunker
If you want to build something and copy it to your final image you can make use of stages
BlueBuild
Stages
A stage is a separate image build flow executed in parallel with the main build.
Luke Skywunker
I do that for helix
matt_savvy
matt_savvyOP2w ago
That's for something you're building from source or what?
Luke Skywunker
Yes So you don't pollute your final image with all the dev tools you need to build it
matt_savvy
matt_savvyOP2w ago
Ah okay, so I'm guessing it's basically just another build stage in the containfile that copies some final built artifact
Luke Skywunker
Yup
matt_savvy
matt_savvyOP2w ago
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
Luke Skywunker
Yeah the Ublue team uses those
matt_savvy
matt_savvyOP2w ago
Well looks like my iso is done flashing so here goes nothing Thanks
Luke Skywunker
Have fun

Did you find this page helpful?