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 <[email protected]>:

> 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" <[email protected]> пише:
>
>>
>> Maybe what you want is lib.mkMerge?
>>
>> - Bjørn
>>
>
_______________________________________________
nix-dev mailing list
[email protected]
http://lists.science.uu.nl/mailman/listinfo/nix-dev

Reply via email to