I can see how this can be usable for configuration. But I am having a hard time imagining how this would look for something like PostgreSQL's data files.
The lines for what counts as "environment" are fuzzy which might pose a challenge, but the fix for that could be as simple as offering sane defaults and letting the user decide what is/isn't included.
Yes! I've been thinking about the same thing as an accessibility feature for disabled users, as well. I recently learned that I'm going blind, and so I've been thinking about how this kind of mechanism could be used to ensure that a system always has, e.g., a working screen reader and fullscreen magnification software. I'd like to add something like this to NixOS, which is my favorite distro and daily driver.
https://github.com/89luca89/distrobox/blob/main/docs/posts/r...
This article is focused on containers because when the root OS is immutable, then mutable developer workflows/etc necessarily happen in containers (distrobox, toolbox, whatever). OSTree is/was commonly described as "git for filesystems". Every update is an entirely new system image which applies a 3-way diff. It's possibly to state in a single command "show me the drift in my config files/data versus the ref I'm running" and/or "show me the diff between my running system and an update I may apply".