[Nix-dev] evalModules: how to use it?
Daniel Hlynskyi
abcz2.uprola at gmail.com
Sun Jul 31 15:24:01 CEST 2016
The advice from Bjorn was correct, but there is a bug in containers code.
Many thanks to @layus for investigating into this problem!
PR with fix https://github.com/NixOS/nixpkgs/pull/17365
2016-07-07 7:47 GMT+00:00 Daniel Hlynskyi <abcz2.uprola at gmail.com>:
> Unfortunately, I don't understand how can apply mkMerge here. Is the
> following example correct?
>
> containers.test-1.config =
>
> let cfg1 = {
>
> networking.extraHosts = ''
>
> 10.10.10.10 bla1
>
> '';
>
> };
>
> cfg2 = {
>
> networking.extraHosts = ''
>
> 11.11.11.11 bla2
>
> '';
>
> };
>
> in lib.mkMerge [
>
> cfg1
>
> cfg2
>
> ];
>
> It doesn't do what I want:
>
> $ sudo nixos-container run test-1 -- cat /etc/hosts
> 127.0.0.1 localhost
> ::1 localhost
>
> 11.11.11.11 bla2
>
> Maybe I should reference somehow to base modules?
>
> 6 лип. 2016 7:13 пп "Bjørn Forsman" <bjorn.forsman at gmail.com> пише:
>
>>
>> Maybe what you want is lib.mkMerge?
>>
>> - Bjørn
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160731/708eb337/attachment.html>
More information about the nix-dev
mailing list