This journey towards running OpenStreetMap on NixOS began as a part of a solution for a client, but the ease and speed of NixOS made it an eye-opening experience. Let’s explore the practicality of OpenStreetMap on NixOS in this article, where I show how to describe a running configuration as a NixOS module.
Two weeks ago I gave a class about server security at the linuxhotel. Although the class had nothing to do with NixOS, one of the participants asked me during a coffee break, how hard it would be to configure a web server with NixOS that provides multiple versions of PHP at the same time. Let’s have a look at how this is simple in NixOS. As an extra, let’s run the whole setup in a declarative systemd-nspawn container to fulfill last week’s promise!
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?