Declarative and immutable DietPi

Hello and thank you for accepting me as a new member!

As a user of many Linux distributions, I was wondering if Dietpi and its many useful tools could one day (in the long-term) be integrated into a declarative and immutable distribution, in order to increase consistency?

Let me explain:

  • The system settings of a declarative and immutable distribution (such as NixOS), is entirely described in a configuration file that generates a stable state of the operating system, which cannot be modified by hand (read-only) and which may be subject to rollbacks (undo).
  • Dietpi tools would simply have to modify this configuration file, then on validation, build the new configuration and switch to a new state.
  • The various settings could either be handled by the Dietpi tool, or unlocked for manual configuration… for example, for my router, I prefer manage my network interfaces and bridges manually with programs other than those used by Dietpi tools.
  • Finally, if we could put any name we wanted to user 1000, that would be great (maybe reserve another number for the special “dietpi” user).

A distribution as (remarkably) portable and easily configurable as Dietpi, as consistant as NixOS, and enough flexible to do whatever you want with it, would be ideal in my opinion from every point of view. It seems to me that the way DietPi works lends itself well to this kind of evolution. These are just few ideas of a new DietPi user, congratulations for this beautiful job!

I don’t think this will happen but recently you are already able to declare some settings before flashing, by modifying dietpi.txt:
https://dietpi.com/docs/usage/#how-to-do-an-automatic-base-installation-at-first-boot-dietpi-automation
You can also call a custom script so in theory you could write a script which does the rest of config which is not coverd by dietpi.txt.

Or you can do it like anybody else: Create a flashable image of your installatin after you’ve done the first boot installation.