16 ms·
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 Ni
by takeda 7y ago
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.
- newnewpdro 7y agosystemd 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.
- takeda 7y agoI see, was not aware of it, although perhaps it might be possible to do it now: https://github.com/NixOS/nixpkgs/pull/67232 https://github.com/NixOS/nixpkgs/pull/67232