[Nix-dev] [PATCH] Some more options to ldap.conf

Rickard Nilsson rickard.nilsson at telia.com
Mon Oct 31 22:38:58 CET 2011


Hi Nicolas,


Den 2011-10-28 11:39:58 skrev Nicolas Pierron  
<nicolas.b.pierron at gmail.com>:

> Hi Rickard,
>
> I will review your patch later, first answering your question.
>
> On Thu, Oct 27, 2011 at 23:51, Rickard Nilsson
> <rickard.nilsson at telia.com> wrote:
>> A general question about patches like this one: When do you stop adding
>> options the Nix way, and just throw in an "extraConfiguration" option? I
>> don't have anything against adding proper options, but is there some
>> guideline to follow?
>
> The problem of adding more and more option is that we start
> duplicating the option originally provided by the tool.  In fact, the
> best way to proceed should be to always provide an option for
> appending modifications (or sorting with mkOrder, mkHeader and
> mkFooter) at the first place.  In which case the description of
> option, which contains the verbatim file (or almost for password),
> should describe where to find the documentation to fill it.
>
> NixOS options are useful when you start having inter-dependencies
> between options and when the same logic can be abstracted under an
> option name.  Additionally, option give you the ability to override
> specific parts of the configuration and not the whole configuration
> file.
>
> To make it short:
> - Always start with something similar to configFile / configContent
> where the documentation links to the document which explains how to
> fill it.
> - Add an option if you need to factor common patterns between modules.
> - Add an option if you want to provide modularity (including ability
> to override and order)
>
> We cannot handle the world (yet?), so we make choices in functions of  
> our needs.

Thanks for your detailed overview. I think those guidelines makes sense.

   / Rickard


More information about the nix-dev mailing list