[Nix-dev] Can recursive attribute sets refer to quoted attributes?

Wout Mertens wout.mertens at gmail.com
Tue Jan 27 17:08:34 CET 2015


So what about `config.environment.etc."hosts.allow"`? Make the interface be
`config.environment.etc = { path:"hosts.allow"; ...;};`?

On Tue Jan 27 2015 at 5:02:27 PM Eelco Dolstra <eelco.dolstra at logicblox.com>
wrote:

> Hi,
>
> On 27/01/15 16:58, Wout Mertens wrote:
>
> > Nix could be extended to accept `rec { "foo.bar" = "test"; bar =
> ${"foo.bar"};}'?
>
> Well, it was probably a mistake to allow string syntax for variable names
> in the
> first place. It might be better to allow '.' to be escaped in variables
> names:
>
> rec {
>   foo\.bar = "test";
>   bar = foo\.bar;
> }
>
> > Is this an important use case?
>
> No, we probably don't want to promote using dots in variable names at all
> :-)
>
> --
> Eelco Dolstra | LogicBlox, Inc. | http://nixos.org/~eelco/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20150127/5c5f4d68/attachment.html 


More information about the nix-dev mailing list