NixOS guest? #430
Replies: 6 comments 9 replies
-
Yes, it would! 😄 The first step is to find a somewhat stable/official location to download cloud images from. The second step is implementing support for the package manager in The third step is trying it out, checking if something is broken, and fixing it. 😈 |
Beta Was this translation helpful? Give feedback.
-
great! I think I already roughly know how to do the first step, to create a working qemu image and install additional stuff, via a script, starting from the official/current NixOS .iso image (pulling it from the NixOS archive). I will put this together over the holidays and report back. I am however pretty hazy about the next steps, and will have to look at the repository in detail to see how it works with alpine or arch linux and go from there. I am far from an expert though, help will be much appreciated! |
Beta Was this translation helpful? Give feedback.
-
Just a quick note that there are 2 different scenarios: booting from an image vs. booting from an ISO. We latter is only done for Alpine right now, and we build a custom ISO to make sure it includes cloud-init (or our own lima-init replacement). Most ISOs are either install or rescue media and do not support this. There is special code in Lima to mount a persistent data volume and move some directories to it, so they survive a reboot. This code probably will need some adjustments if you want to boot NixOS from an ISO instead of a regular image. Let me know if you run into any issues, and I'll try to help out! |
Beta Was this translation helpful? Give feedback.
-
Apparently NixOS thinks that https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/services/system/cloud-init.nix I don't think it is the python3 itself that is the biggest bloat, but it (ci) does have a truckload of dependencies... |
Beta Was this translation helpful? Give feedback.
-
Also registering interest in this development! |
Beta Was this translation helpful? Give feedback.
-
Today i created my nixos image https://github.com/patryk4815/ctftools/tree/master/lima-vm |
Beta Was this translation helpful? Give feedback.
-
I would really love to have a NixOS guest -- at the moment I use lima with the nix package manager on an archlinux guest. I think in theory NixOS should work, looking at the stated requirements. I also have a qemu NixOS VM, that works just fine. It does not have the great lima integration features, so I really want it running from lima.
I guess the best way forward would be to just go ahead and do it myself, but I am new to lima and could not (easily) find a thread how to start. Are there some example instructions somewhere, or where should I look to e.g. how it was done for archlinux or Debian?
Any pointers are much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions