Ask HN: What is our history on trying to standardize configuration languages?

3 jerrac 5 6/2/2025, 10:04:06 PM
I just found myself trying to define configuration language for a tool that would then write the given configuration into a configuration file of whatever format I set. So I was configuring configuration to configure configuration... When that thought occurred to me, it made me stop, and think "this is ridiculous".

I mean, the problem I want to solve is real. Configuring containerized applications is always annoying. Currently I either end up baking the configuration into the image, or using a pre-script to convert environment variables into the configuration I actually need before the app starts. Usually via bash scripts... (Or I have to decipher which method the official image uses. If they have one.)

My idea was to just have a little rust tool in my containers that would take the contents of environment variables and turn them into whatever format (toml, yaml, ini, etc.) the app needs. The problem was how do I represent all the different kinds of values you can have in a language? Lists, key/value lists, associative arrays, maps, etc...

Figuring out how to do that, well, isn't that just yet another configuration language?

And that is why I'm posting this question. Has any real effort ever been put into standardizing configuration languages/syntaxes?

If so, why'd they fail? If not, why not?

Comments (5)

synack · 3d ago
There are 15 competing standards: https://xkcd.com/927

Augeas [1] does a decent job of translating various formats into a common AST which you can edit and write back out, but setting this up is often more trouble than just editing/templating whatever config and moving on with your life.

Many new projects go straight for YAML/TOML/JSON/INI as they're widely understood and relatively easy to parse. I think this is as close to standardization as you'll get.

OpenBSD's developers have gone in the other direction, defining domain specific configuration languages for each of their daemons. They're all different, but they look similar enough that it feels like a cohesive system. You can look at the yacc grammar and see how httpd's config [2] got started as a fork of relayd [3].

[1] http://augeas.net/

[2] https://github.com/openbsd/src/blob/master/usr.sbin/httpd/pa...

[3] https://github.com/openbsd/src/blob/master/usr.sbin/relayd/p...

jerrac · 3d ago
> There are 15 competing standards: https://xkcd.com/927 Heh, that is pretty much the answer I was expecting. :)

Augeas seems interesting. I'll have to look into it a bit more than my cursory glance at the github issue queue. :)

Thanks!

thesuperbigfrog · 3d ago
I would suggest a mostly declarative format like Rust Object Notation (RON):

https://github.com/ron-rs/ron

bigyabai · 3d ago
NixOS "solves" this, albeit with a pretty archaic configuration language and deep buy-in. The end result is that I now keep a Git repo with 95% of my Linux config represented as modules. Then I install each module as-needed (eg. terminal.nix for terminal config, desktop.nix for desktop config) for the devices I use and rebuild it with that set of modules.

Works great, even with my laptop, desktop and server sharing the same config. Versioned rollback + nixpkgs has kept me happy for about 4 years with this setup.

jerrac · 3d ago
Wouldn't that only work on NixOS systems? I'm not sure that counts as standardization.

That said, someday I need to give NixOS a try.