[Nix-dev] IPv6 (was: static networking and dns)
Mathijs Kwik
mathijs at bluescreen303.nl
Mon Aug 13 22:45:33 CEST 2012
On Mon, Aug 13, 2012 at 10:37 PM, Peter Simons <simons at cryp.to> wrote:
> Hi Mathijs,
>
> > I could not find options to set ipv6 addresses
>
> it is possible to configure interfaces with IPv6 addresses, but setting
> the default route requires localCommands trickery:
>
> networking = {
> enableIPv6 = true;
> useDHCP = false;
> defaultGateway = "134.0.24.129";
> nameservers = [ "95.129.51.51" "8.8.8.8" ];
> interfaces = [
> { name = "eth0"; ipAddress = "134.0.24.155"; subnetMask = "255.255.255.128"; }
> { name = "eth0"; ipAddress = "2a03:2900:2:1::5f"; subnetMask = "64"; }
> ];
> localCommands = "ip route add default via 2a03:2900:2:1::1";
> };
>
> I guess, it would be possible to extend networking.defaultGateway to
> configure IPv6 default routes, too. Unfortunately, it's currently
> expected to be a string (rather than a list of strings).
Didn't know about the interfaces trick.
But for now I stick all ipv6 stuff in localCommands.
In the future, would prefer to have separate ipv6 options for gateway
and interfaces instead of tweaking the existing options. This allows
nice things in nix like referring to "the first ipv6 address", which
would need string-analyzing otherwise.
Now, on to the most important tast of the evening, choosing a 1337
address in my subnet :P
dead beef cafe's are lame :D
>
> Take care,
> Peter
>
> _______________________________________________
> nix-dev mailing list
> nix-dev at lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
More information about the nix-dev
mailing list