Does NixOps support LXC?

NixOps supports libvirt and libvirt supports LXC. So, does that mean NixOps supports LXC?

And if so, how can i use it? There is no documentation for libvirt backend.

I want to deploy 1000 identical NixOS containers, that are basically:

  services = {
    openssh.enable = true;
    dnsmasq.enable = true;
    nginx.enable = true;
    nscd.enable = false; # not needed

nixos-containers is practically limited to 250 containers at the moment: Can't start 200 nixos-containers · Issue #67970 · NixOS/nixpkgs · GitHub

and i want to deploy them declaratively. the containers should also have an old NixOS version, so LXC is a good solution.

1 Like

The current master version of NixOps no longer has the libvirtd backend built-in (instead it’s at GitHub - nix-community/nixops-libvirtd: NixOps libvirtd backend plugin [maintainer=@AmineChikhaoui]), but here’s the documentation for version 1.7:

However, looking at its implementation, it seems that it only has support for the KVM/QEMU driver. So I guess getting LXC to run would need some work patching the libvirtd NixOps backend.

1 Like


I created an issue for that: Add LXC support · Issue #18 · nix-community/nixops-libvirtd · GitHub

1 Like