Yesterday I was configuring a new NixOS server after a long time since the last time I did it. One thing that struck me was that the code style was a bit different from the one I used on the previous years.
While the older code highlighted the nested structures:
services = {
caddy = {
virtualHosts = {
"capivaras.dev" = {
extraConfig = '''';
};
};
};
openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
};
};
};
The newer code made them look much less apparent:
services.caddy = {
virtualHosts."capivaras.dev".extraConfig = '''';
};
services.openssh = {
enable = true;
settings.PasswordAuthentication = false;
};
Personally, I think the last style makes Nix module configuration much easier to read. Which Nix code style do you prefer the most?