Here we go again.
"Relying on this shared global state is against mathematical purity..."
"Haskell slogan, if it compiles, it works..."
"Programs should provide some metadata to make it possible to validate the input..."
"A system should be described as a single declarative program..."
Do you want to add that to the base Unix system?
No Sir. You're mistaken.
If anything we need to remove things from the UNIX/POSIX standards, not adding more.
Unix has been the tremendous success it has been because of not doing that.
Let me explain.
People have been asking for this for years. Before it was better standard formatted text, then XML, now JSON.
XML sounds stupid? That is how JSON and whatever metadata you propose will sound in about 1-5 years.
The current config files are so simple that anyone can make a config file without learning fancy formats or figuring out if the OS implemented version 1.5 or 343.1 on the metadata standard. So simple that any part of the system can be fully rewritten without worrying that the stupid config subsystem thing will break in the next version, or the next genius will change everything again for the next "better thing."
I am not saying these are not great ideas. On the contrary, they will work for some software; anything transient and changing. Most software is like that. Even for an OS as you propose, while they remain popular, which will not be long.
The magic of Unix is in its brutal simplicity and flexibility.
So why do you not see that? Why do you say: "Relying on this shared global state is against mathematical purity..."
You do not see that because quality and success is constrained in your mind to ideal computer science constructs. Those are ok if we were implementing solutions to platonic models of reality.
You need to understand that we use Platonic ideas to think, but they do not, cannot, model reality. Plato was right. In your mind, the sum of the triangle's angles is 180, which is generally useful, but in reality, the sum of the angles of any triangle is never a perfect 180.
The CPU needs to follow those rules because that is how we reason, but the programs need to model reality that does not care about our mental models.
Why are mental models used to work with reality then? That is the most intriguing question of the universe. That is for another time.
For now let go of thinking that in software:
A = 1 + 1 , no this is not math. It is not an equation.
A = func(x) no, this is not a platonic function of (x), it is a very Aristotelian model of the real world, and not even god knows what A will take now, or later.
In conclusion.
These are great ideas. You might have success implementing software with some of them. But you are blinded by your mental models, which are academic and of the realm of ideas. That is needed to design a computer processor, but if you want to succeed in modeling software, you need to understand that quality is only one thing: Customer value.
The stupid simple, easy to learn, easy to code, had beaten mathematical purity for 50 years, and it will do so for the next 50, if you do not focus your great ideas, because they are good, towards the reality of the software industry and the purpose of its existence: to resolve people's problems.