nixos/syncthing: point out pitfalls with extraOptions (#210208)

Co-authored-by: digital <git-voopaipa@dinid.net>

authored by maifel-maifel digital and committed by GitHub 4dbc2fe8 2cae7169

+23
+23
nixos/modules/services/networking/syncthing.nix
··· 384 384 description = mdDoc '' 385 385 Extra configuration options for Syncthing. 386 386 See <https://docs.syncthing.net/users/config.html>. 387 + Note that this attribute set does not exactly match the documented 388 + xml format. Instead, this is the format of the json rest api. There 389 + are slight differences. For example, this xml: 390 + ```xml 391 + <options> 392 + <listenAddress>default</listenAddress> 393 + <minHomeDiskFree unit="%">1</minHomeDiskFree> 394 + </options> 395 + ``` 396 + corresponds to the json: 397 + ```json 398 + { 399 + options: { 400 + listenAddresses = [ 401 + "default" 402 + ]; 403 + minHomeDiskFree = { 404 + unit = "%"; 405 + value = 1; 406 + }; 407 + }; 408 + } 409 + ``` 387 410 ''; 388 411 example = { 389 412 options.localAnnounceEnabled = false;