Hi, On Wed, Jul 1, 2015 at 12:31 AM, Rickard Nilsson <rickard.nils...@telia.com> wrote: > top = mkMerge ( > map (a: { ${a}.opt2 = f a; }) (attrNames config.top) > )
This would work, only if you were not redefining top, or if you knew the list of names ahead. > { > options.top = mkOption { > type = with types; attrsOf (submodule ({ name, config, ... }: { > config.opt2 = f name; > }; > }; > } On the other hand, this is the proper way to extend submodules. Note that `opt1` can be accessed with `config.opt1` within each submodule. -- Nicolas Pierron http://www.linkedin.com/in/nicolasbpierron - http://nbp.name/ _______________________________________________ nix-dev mailing list nix-dev@lists.science.uu.nl http://lists.science.uu.nl/mailman/listinfo/nix-dev