[Nix-dev] Re: [Nix-commits] SVN commit: nix - 20576 - ludo - in nixos/trunk/modules: . config

Ludovic Courtès ludo at gnu.org
Fri Mar 12 00:45:32 CET 2010


Hi again,

Nicolas Pierron
<nicolas.b.pierron at gmail.com> writes:

> Unfortunately this won't work.  As I've explained at the Fosdem,
>
> services.xserver.startOpenSSHAgent = false;
>
> does not forbid the user to use it, but
>
> services.xserver.startGnuPGAgent = true;
>
> does.
>
> So you don't want to enable the Gnu versions.

Now I understand what you mean: merging boolean values consists in
or’ing them.  So if the option is defined at least once as ‘true’, then
its final value is ‘true’ and the user cannot change it.

> You want to take precedence over user configuration, in which case I
> recommend you to use mkOverride, but you don't want to force user to
> use all tools.  So you cannot write '' whatever = true; ''.  You can
> only disable non-GNU tools like:
>
> services.xserver.startOpenSSHAgent = mkOverride 0 {} false;
>
> In which case nothing can enable it excepts another "mkOverride 0" (or less).

OK.

> What you are seeking is something which is similar to the rename
> except that it force the other enable flags to be bound to false.
> Unfortunately this may be more complicated but it will ensure that you
> won't get any non-GNU programs even if you want it.

Hmm, but if I explicitly ask for non-GNU programs in
‘configuration.nix’, I still want this choice to have higher precedence
than ‘gnu.nix’...

Thanks,
Ludo’.




More information about the nix-dev mailing list