NixOSaaS
← Back to the blog

6 November 2026 · NixOSaaS

What is NixOS? A guide for Fedora, Ubuntu and Debian users

Follow one change to a Linux server to see how NixOS handles packages, services and recovery differently.

NixOS is a Linux distribution built around Nix, a package manager and build tool. You still have a Linux kernel, users, processes and familiar services. What changes is how you administer the machine: you write down the system you want, then ask NixOS to build and activate it.

One web server, two ways to manage it

On a typical Ubuntu or Debian server, you install nginx with APT, edit its configuration under /etc, and use systemd to manage the service. On a conventional Fedora Server installation, DNF manages RPM packages; the service workflow is similar. All three can be automated. If your Ansible playbooks already describe the whole server, you know the value of keeping that intent in Git.

On NixOS, the operating system itself uses a module system to turn settings into a system configuration. For example, add these options inside the existing configuration attribute set on a test VM:

services.nginx.enable = true;
services.nginx.virtualHosts."localhost".locations."/".return =
  "200 'Hello from NixOS'";

Run sudo nixos-rebuild switch, then curl http://localhost/. The nginx module brings in the package, generates the service configuration and sets up the service. You can review the change in Git and apply the same module to another machine without retracing your shell history. This example tests localhost; it doesn’t open a firewall port.

What happens when a change goes wrong?

Nix builds packages in separate paths in the Nix store. Rebuilding the OS produces a system generation, so a new configuration can coexist with the previous one. If the change breaks your service, sudo nixos-rebuild switch --rollback switches back to the previous generation, if retained. That restores the system configuration; it does not rewind database writes or a user’s home directory. Those still need backups.

Retained generations use disk space. Scheduled garbage collection can remove unreferenced store paths. Choose a retention period deliberately: deleting old generations also removes those rollback points.

Try a small recovery drill before relying on rollback. In a disposable VM, change the nginx greeting, rebuild and check the response. Then roll back and request the same page again. The original greeting should return. A text file you created in your home directory between those two builds should still be there. Seeing both outcomes makes the boundary between system configuration and user data concrete.

When is it worth the switch?

NixOS is useful when you need ten similar workstations or servers and want to explain how each one differs. The trade-off is learning the Nix language and module options, and adapting software that expects to find tools in conventional filesystem locations. Fedora also offers Atomic Desktops with image-based updates; the package-by-package comparison above applies to conventional installations.

If your immediate problem is conflicting developer tools, you can try Nix on an existing machine before replacing the OS. The next article shows how.

Separate building from activation

Use nixos-rebuild build to build a proposed system without activating it. Inspect the change before scheduling a switch, particularly when networking or remote access is involved. Keep shared service settings in reusable modules and machine-specific storage settings separate. This structure makes configuration reviews clearer and reduces accidental coupling between otherwise similar hosts.

Further reading: NixOS manual: changing the configuration, upgrades and rollbacks.