On Mon, 16 Jan 2012 22:05:26 +0100, Nicolas Pierron <[email protected]> wrote: > > (..) > > mkX [ { > > a = 1; > > b = 1; > > c.a = 1; > > } { > > b = 2; > > c.b = 2; > > d = 2; > > } ] > > > > possible results: > > - error because of colliding b > > - first value taken: { a = 1; b = 1; c = { a = 1; b = 2 }; d = 2} > > - last value taken: { a = 1; b = 2; c = { a = 1; b = 2 }; d = 2} > > - both values taken: { a = 1; b = [1 2]; c = { a = 1; b = 2 }; d = 2} > > - both values taken: { a = 1; b = mkX [1 2]; c = mkX [ { a = 1; } { b > = 2; } ]; d = 2}
+1
> Currently the cleanest way to do so is to duplicate the condition on
> the attributes, such as:
>
> config = {
> boot = mkIf cfg.enable { … };
> services = mkIf cfg.aggressive { … };
> };
>
> By the way, usually the enable condition is wrapping everything and
> what you want to do makes me wonder if the aggressive option does not
> deserve another name.
I would wrap everything with enable and additionally with aggressive you
can turn on more aggressive features.
Open for better suggestions.
--
Florian Friesdorf <[email protected]>
GPG FPR: 7A13 5EEE 1421 9FC2 108D BAAF 38F8 99A3 0C45 F083
Jabber/XMPP: [email protected]
IRC: chaoflow on freenode,ircnet,blafasel,OFTC
pgpbfs7yFD6tv.pgp
Description: PGP signature
_______________________________________________ nix-dev mailing list [email protected] http://lists.science.uu.nl/mailman/listinfo/nix-dev
