When showing Nix or NixOS to newcomers, the first instinct is often to run the
NixOS Docker image on
Docker or Podman.
This week we’re having a look at how to do the same with
systemd-nspawn facility via the
This has huge benefits to both trying out NixOS and also professionally using
it like a sidecar VM, as we shall see.
If you’re using Ubuntu, Debian, Fedora, Rocky Linux, or similar, jump right in!
In last week’s article, we got to know
a bit closer:
We’ve seen how it can be used to switch to a new system configuration, or only
test the new system configuration in a VM.
This week, we shift up a gear and look at
nixos-rebuild’s remote building and
One of the things you learn after installing NixOS for the first time is that
all these tasks are basically the same from a tooling perspective:
Adding/removing a package, massively changing the system configuration, or
simply updating it.
After changing the configuration and/or the inputs, you run
and the system is deployed.
If the configuration turns out to be bad - it can simply be rolled back!
But how does this tool work and what other cool features does it have?