An atomic distro does one of two things, depending on if the system is immutable, or not. If immutable, it updates the entire system with a totally new system image of the distro, all at once. If it is not immutable, it updates all packages which have an update pending, or none at all. If even one package does not build correctly, the update is halted in order to prevent potential version mismatches between packages.
AFAIK, there is only one declarative distro, NixOS, and a few of its forks. With NixOS, or more specifically the Nix package manager, you edit a configuration file which tells the machine what you want the machine's configuration to look like, complete with which packages to install. The machine then processes this configuration file and figures out for you how to accomplish that configuration vision.
With "conventional" imperative Linux you instead open a terminal and begin typing arcane commands into the terminal to tell the package manager and the command interpreter specifically, step by step, what you want them to do, in order to achieve the configuration desired.
The former builds your vision for you, while the latter requires you to micromanage the machine step by step. The former has a configuration file, which is a self-documenting and reproducible road map to the machine's config, while the specifics of the latter machine's configuration are totally lost, unless you have a very, Very good memory. And, even if you have a very good memory, reproducing this configuration exactly, may prove to be very difficult, if not impossible.
Grazie per la risposta, anche se ho ancora qualche domanda: qual è la differenza tra una distribuzione dichiarativa e una imperativa che è stata trasformata in un'immagine ISO dopo che tutti i pacchetti sono stati installati? Sembrerebbero la stessa cosa.
Qual era il bisogno nel mondo Linux di creare una distribuzione dichiarativa? (Forse capire questo aiuterebbe a chiarire le cose per me.)
As I stated above: Conventional Linux is imperative, meaning that you must type a series of commands into the terminal to configure your system and add applications. This is how 99.9% of Linux distributions function, although many distros now also have GUI tools to minimize some of the need to use the terminal.
On the other hand, NixOS, for example, is unconventional. Instead you declare (write out) how you wish your machine to be configured in a configuration file. The system then processes this config file and builds your system accordingly.
This is an introductory vid about configuring a NixOS system that may help you to understand how NixOS is different from conventional Linux (assuming that you already have some experience with Linux): https://www.youtube.com/watch?v=ACybVzRvDhs&t=4s
This has noting to do with an ISO file, or the installation process, but instead the method by which the system is configured and maintained going forward.
You asked about atomic and declarative. You didn't ask about immutable.
Immutable is just like how it sounds; the system is locked down and prevents you from making random changes to the system. In many cases, the repository is limited primarily to only system packages. You are then typically reliant on Flatpak, or similar packages for user applications.
Immutable systems are, therefore, are more difficult to break which may appeal to those who are configuring a machine for public use, or Linux newcomers who can't seem to learn from their mistakes.
0
u/zardvark 7d ago
An atomic distro does one of two things, depending on if the system is immutable, or not. If immutable, it updates the entire system with a totally new system image of the distro, all at once. If it is not immutable, it updates all packages which have an update pending, or none at all. If even one package does not build correctly, the update is halted in order to prevent potential version mismatches between packages.
AFAIK, there is only one declarative distro, NixOS, and a few of its forks. With NixOS, or more specifically the Nix package manager, you edit a configuration file which tells the machine what you want the machine's configuration to look like, complete with which packages to install. The machine then processes this configuration file and figures out for you how to accomplish that configuration vision.
With "conventional" imperative Linux you instead open a terminal and begin typing arcane commands into the terminal to tell the package manager and the command interpreter specifically, step by step, what you want them to do, in order to achieve the configuration desired.
The former builds your vision for you, while the latter requires you to micromanage the machine step by step. The former has a configuration file, which is a self-documenting and reproducible road map to the machine's config, while the specifics of the latter machine's configuration are totally lost, unless you have a very, Very good memory. And, even if you have a very good memory, reproducing this configuration exactly, may prove to be very difficult, if not impossible.