Anyone worked with building a Guix System image for LXD

Did anyone work on creating LXD images of Guix SD or integrate Guix with LXD.

Recently tried an image of Gnu Guix to run in LXD but failed as GuixSD use Shepherd init system.

    guix system vm
    guix system vm-image
    guix system disk-image
    guix system container
    guix system docker-image
    guix container 
    guix deploy

It will be nice if LXD has seamless integration with guix deploy.

You can see the details at:


I read that GUIX is based on the linux-libre kernel:
So I don’t know whether thats compatible with the regular kernel (which is used by LXD).

As of version 1.1.0, the standalone Guix System can be installed on an i686, x86_64, ARMv7, or AArch64 machine. It uses the Linux-Libre kernel and the GNU Shepherd init system.


As an alternative you can use GUIX as a package manager for regular linux:

Alternately, GNU Guix can be installed as an additional package manager on top of an installed Linux-based system.

I have tried using the Guix Package manager. What I wanted to do is instead of using a mix of ansible scripts to create an image and then create another ansible script for deploying in LXD cluster, wanted to use Guile with Guix for everything on LXD cluster.

In the long term idea was to use Guix combined with Guile to build an alternative to Kubernetes on top of LXD cluster.

At present K8s is very complicated where iuse a mixture of Bash scripts, Dockerfile to create an image and than use kubectl with YAML for deployment. It can be done with code but is not elegant only a patchwork of many different things.

Guix (or Nix) is elegant with very beautiful language (I like lisp and Scheme) to not just create reproducible image (with verification) but also deploy like the way we write application code. K8s uses combination of bash scripts, Dockerfile, YAML and a complex set of tooling, just propelled by marketing.

So was thinking if can run Guix directly on LXD to experiment, probably will try using Guix VM with LXD daemon, looks like container is not the solution.

:thinking: Well I don’t really know the details and I don’t have the time to look into that.

But you might try some things:

  1. Try running LXD on GUIX Update: Just saw thats not your intention.
  2. Try to modify the image templates ( to fit GUIX (if even possible), so it can be used as an image
  3. try lxc-p2c to create a container from a running system (GUIX on computer, or virtual machine etc.)

I don’t know if one the methods works or not, and I also don’t know if it fits your intended usecase, but it’s maybe worth a try.


I am not so sure about this init topic, I guess someone else might be able to help you with that.

That said, can you give details about your errors and also what exactly you tried to do?

Devuan (essentially debian without systemd) for example also does not use systemd:

But I don’t know whether there is general support for all init systems, or it’s limited to specific ones :thinking:.