Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I haven't used NixOS outside of VirtualBox, but plan to use it for my next Linux setup.

I believe the reason for build-vm is that systemd is central part of NixOS and you can't test it by starting it inside of a container (I don't think systemd even allows it).

The nixos-rebuild command actually creates a path with a new configuration, so you could similarly use nspawn and go there. When you use "nixos-rebuild switch" it updates "/run/current-system" symlink to that new location.



systemd is container-aware, you should be able to directly "boot" nix containers then using tooling like systemd-nspawn, and login/manage using machinectl. It will all "just work" with systemd on both sides.


I see, was not aware of it, although perhaps it might be possible to do it now: https://github.com/NixOS/nixpkgs/pull/67232




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: