So we have nixos-container for generating a chroot container, pkgs.dockerTools.buildImage for building a Docker image with Nix expression, but is it possible to build an image with NixOS’s configuration?
For example, I was reading about services.vikunja, this configuration is well written, and to translate this into a docker image manually takes some work. I will be awesome if we can use that to create a docker image right away.
Not only would this make a deployment with Docker easy, and those images can be run on other distro as well?
Yes actually I have tried this and asked the author directly. They don’t seem to have a NixOS module right now, and arion now is mainly used for deploying to Non-NixOS system, if I understand it correctly.
I checked flake-containers, but this is not what I’m looking for. I’m looking for build OCI containers only, based on a NixOS configuration so I can create a user and install a Home Manager profile. I can’t believe why such a thing is so hard to achieve. I must be doing something wrong.