NixOS Image Building

Hello LXD team!

I’ve been exploring getting images built for NixOS and am at the point I probably need your input on options. I want to try and bring first class support to the distribution if possible, to allow users to pull images from an image server. Preferably I would like that to be the LXD team’s image server.

I’ve looked into extending distrobuilder similar to other distributions, but unsurprisingly NixOS is not like other distributions. System tarballs for example, don’t include a typically functional system so steps like actions are not possible. Even running nix itself is not discoverable until the system has been booted (activated).

Given that Nix is itself a build system and can output images/tarballs/etc, I’m wondering if it would be possible to just leverage Nix directly? Is this something that would be allowable using the lxc-ci instance maybe with a custom job that uses a Nix docker container? Would you want/require it to be run through distrobuilder?

I probably have other questions or ideas, but I’ll stop here to get the conversation started. Thanks and I look forward to your input.

@monstermunchkin may have an idea about how to proceed here.

1 Like