@@ -1,6 +1,30 @@
11{ lib, pkgs }:
22{
33 javaProperties = { comment ? "Generated with Nix" }: {
4+
5+ # Design note:
6+ # A nested representation of inevitably leads to bad UX:
7+ # 1. keys like "a.b" must be disallowed, or
8+ # the addition of options in a freeformType module
9+ # become breaking changes
10+ # 2. adding a value for "a" after "a"."b" was already
11+ # defined leads to a somewhat hard to understand
12+ # Nix error, because that's not something you can
13+ # do with attrset syntax. Workaround: "a"."", but
14+ # that's too little too late. Another workaround:
15+ # mkMerge [ { a = ...; } { a.b = ...; } ].
16+ #
17+ # Choosing a non-nested representation does mean that
18+ # we sacrifice the ability to override at the (conceptual)
19+ # hierarchical levels, _if_ an application exhibits those.
20+ #
21+ # Some apps just use periods instead of spaces in an odd
22+ # mix of attempted categorization and natural language,
23+ # with no meaningful hierarchy.
24+ #
25+ # We _can_ choose to support hierarchical config files
26+ # via nested attrsets, but the module author should
27+ # make sure that problem (2) does not occur.
428 type = lib.types.attrsOf lib.types.str;
529
630 generate = name: value: