X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=doc%2Fcfg%2Findex.texi;h=1fbca4945efb285b62deb7b56bde58d17eb6d3b9;hb=bb7fe5e770586be9f44a8a7f3321a3139d5345bb;hp=1944eaa2b8b5d772bae60e852456f489e8639d7d;hpb=0ee0ba3784ce20e69d8db6316c99e7f0b6d30809;p=nncp.git diff --git a/doc/cfg/index.texi b/doc/cfg/index.texi index 1944eaa..1fbca49 100644 --- a/doc/cfg/index.texi +++ b/doc/cfg/index.texi @@ -1,9 +1,12 @@ @node Configuration +@cindex configuration file @unnumbered Configuration file +@cindex Hjson NNCP uses single file configuration file in @url{https://hjson.org/, -Hjson} format. Initially it is created with @ref{nncp-cfgnew} command -and at minimum it can look like this: +Hjson} format (see also section about @ref{Configuration directory, +directory layout}) . Initially it is created with @command{@ref{nncp-cfgnew}} +command and at minimum it can look like this: @verbatim spool: /var/spool/nncp @@ -29,17 +32,32 @@ neigh: { } @end verbatim +@cindex JSON +@pindex hjson-cli +@pindex gojq +@pindex gjo +Do not forget that Hjson can be safely converted to JSON and vice versa +(loosing formatting and comments of course). By default +@command{hjson-cli} utility from @code{github.com/hjson/hjson-go} is +built together with @command{nncp-*} commands too. For querying +information from the JSON from the command line you can use +@code{github.com/itchyny/gojq} and @code{github.com/skanehira/gjo} for +building it up. + And for being able to communicate with at least one other node, you just need to add single key to the @code{neigh} section similar to the "self". -All configuration file can be separated on five sections: +Whole configuration file can be separated on five sections: @menu -* General options: CfgGeneral. -* Self-node keypairs: CfgSelf. -* Notifications: CfgNotify. -* Neighbours: CfgNeigh. -* Areas: CfgAreas. +* General options: CfgGeneral +* Self-node keypairs: CfgSelf +* Notifications: CfgNotify +* Neighbours: CfgNeigh +* Areas: CfgAreas + +You can optionally convert it to directory layout +* Configuration directory:: @end menu @include cfg/general.texi @@ -47,3 +65,4 @@ All configuration file can be separated on five sections: @include cfg/notify.texi @include cfg/neigh.texi @include cfg/areas.texi +@include cfg/dir.texi