[Nix-dev] recursiveUpdate for lists
Tomasz Czyż
tomasz.czyz at gmail.com
Tue Oct 11 15:44:40 CEST 2016
Basically I created simple wrapper function to create systemd services.
The function produces something like
{
my-service={
requires=["service1.service"];
};
}
I want to customize it after with recursiveUpdate function, I want to merge
it with
{
my-service={
requires=["some-other.service"]
};
}
I tried to avoid module stuff as in that case if I understand correctly I
need to prepare my description of systemd service on top of standard nix
systemd config structures which is probably big waste.
What do you think?
2016-10-11 14:31 GMT+01:00 Игорь Пашев <pashev.igor at gmail.com>:
> Something like https://github.com/NixOS/nixpkgs/blob/master/lib/types.
> nix#L117 ?
>
> I don't know what you are dealing with, but probably you could
> delegate it to modules.
>
> 2016-10-11 16:00 GMT+03:00 Tomasz Czyż <tomasz.czyz at gmail.com>:
> > Hi,
> >
> > I'm using recursiveUpdate to merge some attribute sets to construct
> > configurations.
> >
> > Does anyone know similar function but which also merges lists?
> > recursiveUpdate just overrides list from the lastest attribute instead of
> > merging (list it does for attributes).
> >
> > Tom
> >
> > _______________________________________________
> > nix-dev mailing list
> > nix-dev at lists.science.uu.nl
> > http://lists.science.uu.nl/mailman/listinfo/nix-dev
> >
>
--
Tomasz Czyż
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20161011/299a8102/attachment-0001.html>
More information about the nix-dev
mailing list