I have been getting into the warm waters of Nixos...
One of the questions the Nixos document does not appear to address is application state. There is, of course, application configuration, which is static and lives fine in the immutable nix-store; however both user and system mutable states aren't address. In particular, state format version changes during upgrades and rollbacks aren't mentioned. Presumably, upgrades are migrated fine from early format versions but what happens for rollbacks?
I am somewhat aware of HomeManager but it does not appear to address state format version changes nor does it appear applicable to system wide application states such as database structures.
Granted, configuration formats do not change frequently. However, is there documentation I am missing?
Thanks for your attention.
system.stateVersion, which should stay static as the system is upgraded.