Question is, is there a “more correct” way to go about configuring non-nixos bootc images using nix, with NixOS based options than to use pkgs.dockerTools.streamLayeredImages
I’ve been using NixOS in my homelab for a while and that is the limit of my Nix knowledge.
I became interested in configuring Fedora Bootc images like nixos because I wanted to have things like SELinux, and first party packaged applications that nixpkgs doesn’t have. Bootc seemed to offer a way to do that while retaining atomic upgrades and significant reproducibility. (Otherwise System Manager looks great.)
I started using pkgs.dockerTools.streamLayeredImage, and inspired by System Manager I altered a number of their modules to work with bootc images and built from there. Thankfully I didn’t need to build any type of system-activation because the bootc image itself handles that. (I have used llms to help me dig through NixOS modules and speed up work, but this was a project for learning not just for ai to do it for me.)
Now, I’ve gotten here, and most core options are functioning. environment.etc, systemd.*,users.* and others are all nearly mirroring NixOS’s options. (documentation details where things are at.)
Currently I actually have a projectbluefin/dakota GnomeOS based bootc image in my homelab that is deploying configuring users, and services, using Agenix, Home manager, and microvm.nix, and sharing configuration the rest of my NixOS machines were already using.
I’m happy with the state of the project and everything I’ve learned so far, but I’m wondering if this is the correct approach to this problem, or if it would be better to start over with a different method, or if in the long run configuring bootc with nix faces other core issues that would cause this to not be worth it.