I use several Linux distributions and like how NixOS lets me describe my system in a configuration file, such as /etc/nixos/configuration.nix. That makes it easy to install software and reproduce the same setup on another machine by copying the configuration. Are there comparable tools or approaches for Debian-, RPM-, or Arch-based distributions?
5 Answers
You can install Nix itself on many different distributions, so you may be able to keep using Nix for reproducible package and development environments without switching the entire operating system.
Ansible is probably the closest practical option. You can write playbooks describing the packages, configuration files, services, and other setup steps, then apply them to another machine.
If you don't need an exact recreation of the whole system, a simple approach is to export or record the list of installed packages in a text file and use that as a reference when setting up another computer.
GNU Guix offers a similar declarative approach, although it is its own distribution and is not based on Debian, RPM, or Arch. For more conventional distributions, people often combine installation scripts with configuration management tools.
There isn't one universal tool that works exactly like the NixOS configuration system on every other distribution. Provisioning tools such as Ansible, Kickstart, and shell scripts can provide similar results, depending on whether you want to configure an existing system or automate installation from scratch.

That makes sense. It isn't exactly the same model as NixOS, but Ansible seems practical enough, and it worked well for setting up an Arch system.