Open asbachb opened 5 years ago
Yeah it seems more related to a nixpkgs + LXC issue. This project just takes the nixos profiles and creates a generic interface to produce the images, with a bit of nix glue code to make that work.
I was able to get this working with lxc image import $(nixos-generate -f lxc-metadata) $(nixos-generate -f lxc)
^2 followed by lxc launch -c security.nesting=true 123 nixos
^0 where 123
was the imported image fingerprint.
It looks like it should also be possible without security.nesting
with some lxc profile
settings^1.
Probably unsurprising to experienced nix users, I had to set boot.isContainer = true;
(thanks to this thread) before I could nixos-rebuild switch
due to errors about filesystems and grub.
Summary
nixos-generate
generated image is not able to performnixos-rebuild switch
.Host
Guest
Maybe contains relevant information: https://github.com/NixOS/nixpkgs/issues/9735#issuecomment-500164017